diff --git a/bochs/cpu/cpu.cc b/bochs/cpu/cpu.cc index 2c13010a1..1527f2bb5 100644 --- a/bochs/cpu/cpu.cc +++ b/bochs/cpu/cpu.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: cpu.cc,v 1.287 2009-04-11 14:02:13 sshwarts Exp $ +// $Id: cpu.cc,v 1.288 2009-04-11 17:00:28 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -638,8 +638,10 @@ unsigned BX_CPU_C::handleAsyncEvent(void) // If debug events are not inhibited on this boundary, // fire off a debug fault. Otherwise handle it on the next // boundary. (becomes a trap) - if (! (BX_CPU_THIS_PTR inhibit_mask & BX_INHIBIT_DEBUG)) + if (! (BX_CPU_THIS_PTR inhibit_mask & BX_INHIBIT_DEBUG)) { + BX_ERROR(("#DB: x86 code breakpoint catched")); exception(BX_DB_EXCEPTION, 0, 0); // no error, not interrupt + } } } } diff --git a/bochs/cpu/sse_pfp.cc b/bochs/cpu/sse_pfp.cc index 5f53e2998..fa612c966 100644 --- a/bochs/cpu/sse_pfp.cc +++ b/bochs/cpu/sse_pfp.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: sse_pfp.cc,v 1.53 2009-03-10 21:43:11 sshwarts Exp $ +// $Id: sse_pfp.cc,v 1.54 2009-04-11 17:00:28 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (c) 2003 Stanislav Shwartsman @@ -32,6 +32,7 @@ void BX_CPU_C::check_exceptionsSSE(int exceptions_flags) { + exceptions_flags &= 0x3F; int unmasked = ~(MXCSR.get_exceptions_masks()) & exceptions_flags; MXCSR.set_exceptions(exceptions_flags); diff --git a/bochs/fpu/softfloat-round-pack.cc b/bochs/fpu/softfloat-round-pack.cc index e4caa93c5..66ae22e04 100755 --- a/bochs/fpu/softfloat-round-pack.cc +++ b/bochs/fpu/softfloat-round-pack.cc @@ -203,6 +203,7 @@ float32 roundAndPackFloat32(int zSign, Bit16s zExp, Bit32u zSig, float_status_t && ((Bit32s) (zSig + roundIncrement) < 0))) { float_raise(status, float_flag_overflow | float_flag_inexact); + if (roundIncrement != 0) set_float_rounding_up(status); return packFloat32(zSign, 0xFF, 0) - (roundIncrement == 0); } if (zExp < 0) { @@ -302,6 +303,7 @@ float64 roundAndPackFloat64(int zSign, Bit16s zExp, Bit64u zSig, float_status_t && ((Bit64s) (zSig + roundIncrement) < 0))) { float_raise(status, float_flag_overflow | float_flag_inexact); + if (roundIncrement != 0) set_float_rounding_up(status); return packFloat64(zSign, 0x7FF, 0) - (roundIncrement == 0); } if (zExp < 0) {