Merged patch from #SF site tracker
This commit is contained in:
parent
5dd0d64b11
commit
c7e732fc8c
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: fpu.cc,v 1.20 2006-03-06 22:03:04 sshwarts Exp $
|
||||
// $Id: fpu.cc,v 1.21 2006-09-08 11:26:04 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2003 Stanislav Shwartsman
|
||||
@ -63,20 +63,21 @@ void BX_CPU_C::FPU_check_pending_exceptions(void)
|
||||
{
|
||||
if(BX_CPU_THIS_PTR the_i387.get_partial_status() & FPU_SW_Summary)
|
||||
{
|
||||
// NE=1 selects the native or internal mode, which generates #MF,
|
||||
// which is the same as the native version of exception handling
|
||||
// for the 80286 and 80287 and the i386 processors and i387 math
|
||||
// coprocessor.
|
||||
// NE=1 selects the native or internal mode, which generates #MF,
|
||||
// which is an extension introduced with 80486.
|
||||
// NE=0 selects the original (backward compatible) FPU error
|
||||
// handling, which generates an IRQ 13 via the PIC chip.
|
||||
#if BX_CPU_LEVEL >= 4
|
||||
if (BX_CPU_THIS_PTR cr0.ne == 0)
|
||||
{
|
||||
// MSDOS compatibility external interrupt (IRQ13)
|
||||
BX_INFO (("math_abort: MSDOS compatibility FPU exception"));
|
||||
DEV_pic_raise_irq(13);
|
||||
}
|
||||
else
|
||||
if (BX_CPU_THIS_PTR cr0.ne != 0) {
|
||||
exception(BX_MF_EXCEPTION, 0, 0);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
exception(BX_MF_EXCEPTION, 0, 0);
|
||||
{
|
||||
// MSDOS compatibility external interrupt (IRQ13)
|
||||
BX_INFO (("math_abort: MSDOS compatibility FPU exception"));
|
||||
DEV_pic_raise_irq(13);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user