From a4427eeade843f98418106daa72399c33d46ef91 Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 6 May 1996 21:55:31 +0000 Subject: [PATCH] for 040, copy replacement routines over fpfault zone in trap table --- sys/arch/mvme68k/mvme68k/machdep.c | 8 ++++++- sys/arch/mvme68k/mvme68k/vectors.s | 37 ++++++++++++++++++++---------- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c index fdf119f0b2a..b37ee9a6e56 100644 --- a/sys/arch/mvme68k/mvme68k/machdep.c +++ b/sys/arch/mvme68k/mvme68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.8 1996/05/04 16:07:49 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.9 1996/05/06 21:55:31 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -493,6 +493,7 @@ identifycpu() char *t, *mc; char speed[6]; char suffix[30]; + extern u_long fpvect_tab, fpvect_end, fpsp_tab; int len; bzero(suffix, sizeof suffix); @@ -536,6 +537,11 @@ identifycpu() suffix, speed, mc); switch (mmutype) { case MMU_68040: +#ifdef FPSP + bcopy(&fpsp_tab, &fpvect_tab, &fpvect_end - &fpvect_tab); +#endif + strcat(cpu_model, "+MMU"); + break; case MMU_68030: strcat(cpu_model, "+MMU"); break; diff --git a/sys/arch/mvme68k/mvme68k/vectors.s b/sys/arch/mvme68k/mvme68k/vectors.s index 4ff0709bb2e..f3c1db3a416 100644 --- a/sys/arch/mvme68k/mvme68k/vectors.s +++ b/sys/arch/mvme68k/mvme68k/vectors.s @@ -1,4 +1,4 @@ -/* $OpenBSD: vectors.s,v 1.3 1996/04/28 10:59:17 deraadt Exp $ */ +/* $OpenBSD: vectors.s,v 1.4 1996/05/06 21:55:32 deraadt Exp $ */ | Copyright (c) 1995 Theo de Raadt | @@ -123,16 +123,12 @@ _vectab: .long _illinst /* 45: TRAP instruction vector */ .long _illinst /* 46: TRAP instruction vector */ .long _trap15 /* 47: TRAP instruction vector */ -#ifdef FPSP - .globl bsun, inex, dz, unfl, operr, ovfl, snan - .long bsun /* 48: FPCP branch/set on unordered cond */ - .long inex /* 49: FPCP inexact result */ - .long dz /* 50: FPCP divide by zero */ - .long unfl /* 51: FPCP underflow */ - .long operr /* 52: FPCP operand error */ - .long ovfl /* 53: FPCP overflow */ - .long snan /* 54: FPCP signalling NAN */ -#else + + /* + * 68881/68882: _fpfault zone + */ + .globl _fpvect_tab, _fpvect_end +_fpvect_tab: .globl _fpfault .long _fpfault /* 48: FPCP branch/set on unordered cond */ .long _fpfault /* 49: FPCP inexact result */ @@ -141,7 +137,7 @@ _vectab: .long _fpfault /* 52: FPCP operand error */ .long _fpfault /* 53: FPCP overflow */ .long _fpfault /* 54: FPCP signalling NAN */ -#endif +_fpvect_end: .long _fpunsupp /* 55: FPCP unimplemented data type */ .long _badtrap /* 56: unassigned, reserved */ @@ -170,3 +166,20 @@ _vectab: BADTRAP16 /* 208-223: user interrupt vectors */ BADTRAP16 /* 224-239: user interrupt vectors */ BADTRAP16 /* 240-255: user interrupt vectors */ + + +#ifdef FPSP + /* + * 68040: this chunk of vectors is copied into the _fpfault zone + */ + .globl _fpsp_tab +_fpsp_tab: + .globl bsun, inex, dz, unfl, operr, ovfl, snan + .long bsun /* 48: FPCP branch/set on unordered cond */ + .long inex /* 49: FPCP inexact result */ + .long dz /* 50: FPCP divide by zero */ + .long unfl /* 51: FPCP underflow */ + .long operr /* 52: FPCP operand error */ + .long ovfl /* 53: FPCP overflow */ + .long snan /* 54: FPCP signalling NAN */ +#endif FPSP -- 2.20.1