armjit: Fix BKPT on simple exits.

If we get lucky and write a single-op destination address, we only emit
one op.  So we have to check the next op before overwriting.
This commit is contained in:
Unknown W. Brackets 2014-12-22 22:56:15 -08:00
parent cb50075cf9
commit 326c298207

View File

@ -415,12 +415,12 @@ void JitBlockCache::LinkBlockExits(int i) {
}
ARMXEmitter emit(b.exitPtrs[e]);
emit.B(blocks_[destinationBlock].checkedEntry);
u32 op = 0;
u32 op = *((const u32 *)emit.GetCodePtr());
// Overwrite with nops until the next unconditional branch.
do {
while ((op & 0xFF000000) != 0xEA000000) {
emit.BKPT(1);
op = *((const u32 *)emit.GetCodePtr());
} while ((op & 0xFF000000) != 0xEA000000);
}
emit.BKPT(1);
emit.FlushIcache();
b.linkStatus[e] = true;