Do not affect CPU state if any exception occured - in this case do not write to MEM and flags
This commit is contained in:
parent
17af54cbbb
commit
dbfa7a51e9
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: arith32.cc,v 1.64 2007-12-01 16:45:16 sshwarts Exp $
|
||||
// $Id: arith32.cc,v 1.65 2007-12-03 20:48:02 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -707,10 +707,10 @@ void BX_CPU_C::CMPXCHG8B(bxInstruction_c *i)
|
||||
diff |= EDX - op1_64_hi;
|
||||
|
||||
if (diff == 0) { // if accumulator == dest
|
||||
assert_ZF();
|
||||
// dest <-- src
|
||||
write_RMW_virtual_dword(ECX);
|
||||
write_virtual_dword(i->seg(), RMAddr(i), &EBX);
|
||||
write_RMW_virtual_dword(ECX);
|
||||
assert_ZF();
|
||||
}
|
||||
else {
|
||||
clear_ZF();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: arith64.cc,v 1.40 2007-11-21 22:36:01 sshwarts Exp $
|
||||
// $Id: arith64.cc,v 1.41 2007-12-03 20:48:02 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -685,10 +685,10 @@ void BX_CPU_C::CMPXCHG16B(bxInstruction_c *i)
|
||||
diff |= RDX - op1_64_hi;
|
||||
|
||||
if (diff == 0) { // if accumulator == dest
|
||||
assert_ZF();
|
||||
// dest <-- src
|
||||
write_RMW_virtual_qword(RCX);
|
||||
write_virtual_qword(i->seg(), RMAddr(i), &RBX);
|
||||
write_RMW_virtual_qword(RCX);
|
||||
assert_ZF();
|
||||
}
|
||||
else {
|
||||
clear_ZF();
|
||||
|
Loading…
Reference in New Issue
Block a user