Changed trap.c so that a panic will occur if we do not have hardware
FP and we try to call the emulator when it is not compiled in. Removed the #if defined(i486) || defined(i387) that use to call the panic if we did not have a math emulator. Removed an extranious include of i386/i386/math_emu.h from math_emulate.c.
This commit is contained in:
parent
34f949aed5
commit
a0ad3760a2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=351
@ -43,7 +43,7 @@
|
||||
* 08 Apr 93 Bruce Evans Several VM system fixes
|
||||
* Paul Kranenburg Add counter for vmstat
|
||||
*/
|
||||
static char rcsid[] = "$Header: /a/cvs/386BSD/src/sys/i386/i386/trap.c,v 1.1.1.1 1993/06/12 14:58:05 rgrimes Exp $";
|
||||
static char rcsid[] = "$Header: /a/cvs/386BSD/src/sys/i386/i386/trap.c,v 1.2 1993/07/27 10:52:20 davidg Exp $";
|
||||
|
||||
/*
|
||||
* 386 Trap and System call handleing
|
||||
@ -210,8 +210,12 @@ if(curpcb == 0 || curproc == 0) goto we_re_toast;
|
||||
/* if a transparent fault (due to context switch "late") */
|
||||
if (npxdna()) return;
|
||||
#endif
|
||||
#ifdef MATH_EMULATE
|
||||
i = math_emulate(&frame);
|
||||
if (i == 0) return;
|
||||
#else /* MATH_EMULTATE */
|
||||
panic("trap: math emulation necessary!");
|
||||
#endif /* MATH_EMULTATE */
|
||||
ucode = FPE_FPU_NP_TRAP;
|
||||
break;
|
||||
|
||||
|
@ -78,10 +78,6 @@ put_fs_long(unsigned long val, unsigned long *adr) { (void)suword(adr,val); }
|
||||
|
||||
math_emulate(struct trapframe * info)
|
||||
{
|
||||
#if defined(i486) || defined(i387)
|
||||
panic("math_emulate(), shouldn't happen with -Di486 or -Di387");
|
||||
}
|
||||
#else
|
||||
unsigned short code;
|
||||
temp_real tmp;
|
||||
char * address;
|
||||
@ -964,8 +960,6 @@ void fmul(const temp_real * src1, const temp_real * src2, temp_real * result)
|
||||
* temporary real division routine.
|
||||
*/
|
||||
|
||||
#include "i386/i386/math_emu.h"
|
||||
|
||||
static void shift_left(int * c)
|
||||
{
|
||||
__asm__ __volatile__("movl (%0),%%eax ; addl %%eax,(%0)\n\t"
|
||||
@ -1484,4 +1478,3 @@ void int_to_real(const temp_int * a, temp_real * b)
|
||||
:"0" (b->a),"1" (b->b));
|
||||
}
|
||||
}
|
||||
#endif /* defined(i486) || defined(i387) */
|
||||
|
@ -43,7 +43,7 @@
|
||||
* 08 Apr 93 Bruce Evans Several VM system fixes
|
||||
* Paul Kranenburg Add counter for vmstat
|
||||
*/
|
||||
static char rcsid[] = "$Header: /a/cvs/386BSD/src/sys/i386/i386/trap.c,v 1.1.1.1 1993/06/12 14:58:05 rgrimes Exp $";
|
||||
static char rcsid[] = "$Header: /a/cvs/386BSD/src/sys/i386/i386/trap.c,v 1.2 1993/07/27 10:52:20 davidg Exp $";
|
||||
|
||||
/*
|
||||
* 386 Trap and System call handleing
|
||||
@ -210,8 +210,12 @@ if(curpcb == 0 || curproc == 0) goto we_re_toast;
|
||||
/* if a transparent fault (due to context switch "late") */
|
||||
if (npxdna()) return;
|
||||
#endif
|
||||
#ifdef MATH_EMULATE
|
||||
i = math_emulate(&frame);
|
||||
if (i == 0) return;
|
||||
#else /* MATH_EMULTATE */
|
||||
panic("trap: math emulation necessary!");
|
||||
#endif /* MATH_EMULTATE */
|
||||
ucode = FPE_FPU_NP_TRAP;
|
||||
break;
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
* 08 Apr 93 Bruce Evans Several VM system fixes
|
||||
* Paul Kranenburg Add counter for vmstat
|
||||
*/
|
||||
static char rcsid[] = "$Header: /a/cvs/386BSD/src/sys/i386/i386/trap.c,v 1.1.1.1 1993/06/12 14:58:05 rgrimes Exp $";
|
||||
static char rcsid[] = "$Header: /a/cvs/386BSD/src/sys/i386/i386/trap.c,v 1.2 1993/07/27 10:52:20 davidg Exp $";
|
||||
|
||||
/*
|
||||
* 386 Trap and System call handleing
|
||||
@ -210,8 +210,12 @@ if(curpcb == 0 || curproc == 0) goto we_re_toast;
|
||||
/* if a transparent fault (due to context switch "late") */
|
||||
if (npxdna()) return;
|
||||
#endif
|
||||
#ifdef MATH_EMULATE
|
||||
i = math_emulate(&frame);
|
||||
if (i == 0) return;
|
||||
#else /* MATH_EMULTATE */
|
||||
panic("trap: math emulation necessary!");
|
||||
#endif /* MATH_EMULTATE */
|
||||
ucode = FPE_FPU_NP_TRAP;
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user