mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-04 07:00:51 +00:00
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:
parent
cb50075cf9
commit
326c298207
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user