mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-04 03:33:44 +01:00
Clean up after the block linker. armdis: add BKPT
This commit is contained in:
1 parent
e43c7af32c
commit
74d8a9bdba
2 files changed
+17
-6
No files matched your search
@@ -404,8 +404,19 @@ void JitBlockCache::LinkBlockExits(int i) {
|
||||
int destinationBlock = GetBlockNumberFromStartAddress(b.exitAddress[e]);
|
||||
if (destinationBlock != -1) {
|
||||
#if defined(ARM)
|
||||
const u8 *nextExit = b.exitPtrs[e + 1];
|
||||
if (!nextExit) {
|
||||
nextExit = b.normalEntry + b.codeSize;
|
||||
}
|
||||
ARMXEmitter emit(b.exitPtrs[e]);
|
||||
emit.B(blocks_[destinationBlock].checkedEntry);
|
||||
u32 op = 0;
|
||||
// Overwrite with nops until the next unconditional branch.
|
||||
do {
|
||||
emit.BKPT(1);
|
||||
op = *((const u32 *)emit.GetCodePtr());
|
||||
} while ((op & 0xFF000000) != 0xEA000000);
|
||||
emit.BKPT(1);
|
||||
emit.FlushIcache();
|
||||
|
||||
#elif defined(_M_IX86) || defined(_M_X64)
|
||||
@@ -609,7 +620,7 @@ void JitBlockCache::InvalidateICache(u32 address, const u32 length) {
|
||||
|
||||
int JitBlockCache::GetBlockExitSize() {
|
||||
#if defined(ARM)
|
||||
// TODO
|
||||
// Will depend on the sequence found to encode the destination address.
|
||||
return 0;
|
||||
#elif defined(_M_IX86) || defined(_M_X64)
|
||||
return 15;
|
||||
|
||||
Reference in new issue
Block a user