bug fixes

This commit is contained in:
Stanislav Shwartsman 2011-09-06 13:09:45 +00:00
parent 9483414f84
commit 5a350143a5
2 changed files with 5 additions and 2 deletions

View File

@ -566,7 +566,7 @@ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::DEC_EqM(bxInstruction_c *i)
BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::DEC_EqR(bxInstruction_c *i)
{
Bit64u rrx = --BX_READ_64BIT_REG(i->rm());
SET_FLAGS_OSZAPC_INC_64(rrx);
SET_FLAGS_OSZAPC_DEC_64(rrx);
BX_NEXT_INSTR(i);
}

View File

@ -737,7 +737,10 @@ void BX_CPU_C::prefetch(void)
// The next instruction could already hit a code breakpoint but
// async_event won't take effect immediatelly.
// Check if the next executing instruction hits code breakpoint
if (RIP == BX_CPU_THIS_PTR prev_rip) { // if not fetching page cross instruction
// check only if not fetching page cross instruction
// this check is 32-bit wrap safe as well
if (EIP == (Bit32u) BX_CPU_THIS_PTR prev_rip) {
if (code_breakpoint_match(laddr)) exception(BX_DB_EXCEPTION, 0);
}
}