diff --git a/Core/MIPS/JitCommon/JitBlockCache.cpp b/Core/MIPS/JitCommon/JitBlockCache.cpp index 467d50c5afc8..e131bbe052d8 100644 --- a/Core/MIPS/JitCommon/JitBlockCache.cpp +++ b/Core/MIPS/JitCommon/JitBlockCache.cpp @@ -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; diff --git a/ext/disarm.cpp b/ext/disarm.cpp index b76ca404052e..851423695103 100644 --- a/ext/disarm.cpp +++ b/ext/disarm.cpp @@ -357,11 +357,6 @@ static bool DisasmNeonLDST(uint32_t op, char *text) { return true; } -static bool DisasmNeonF3(uint32_t op, char *text) { - sprintf(text, "NEON F3"); - return true; -} - static bool DisasmNeonF2F3(uint32_t op, char *text) { sprintf(text, "NEON F2"); if (((op >> 20) & 0xFFC) == 0xF20 || ((op >> 20) & 0xFFC) == 0xF30) { @@ -727,6 +722,11 @@ instr_disassemble(word instr, address addr, pDisOptions opts) { mnemonic = "BL"; format = "0"; break; + } else if ((instr & 0x0FF000F0) == 0x01200070) { + int imm = ((instr & 0xFFF00) >> 4) | (instr & 0xF); + snprintf(result.text, sizeof(result.text), "BKPT %d", imm); + result.undefined = 0; + return &result; } case 3: if (instr >> 24 == 0xF3) {