From 24d8a34a0b4205349305932219326f06fa1ce6aa Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 23 Jun 2014 08:20:38 -0700 Subject: [PATCH] Properly respect resolveReplacements. And use the same opcode reading func in armjit as x86jit. Fixes Star Ocean on Android. --- Core/MIPS/ARM/ArmJit.cpp | 6 +++--- Core/MemMap.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/MIPS/ARM/ArmJit.cpp b/Core/MIPS/ARM/ArmJit.cpp index edf613e9a9..bf79bf23d3 100644 --- a/Core/MIPS/ARM/ArmJit.cpp +++ b/Core/MIPS/ARM/ArmJit.cpp @@ -179,7 +179,7 @@ void Jit::CompileDelaySlot(int flags) MRS(R8); // Save flags register. R8 is preserved through function calls and is not allocated. js.inDelaySlot = true; - MIPSOpcode op = Memory::Read_Instruction(js.compilerPC + 4); + MIPSOpcode op = Memory::Read_Opcode_JIT(js.compilerPC + 4); MIPSCompileOp(op); js.inDelaySlot = false; @@ -275,7 +275,7 @@ const u8 *Jit::DoJit(u32 em_address, JitBlock *b) { gpr.SetCompilerPC(js.compilerPC); // Let it know for log messages fpr.SetCompilerPC(js.compilerPC); - MIPSOpcode inst = Memory::Read_Instruction(js.compilerPC); + MIPSOpcode inst = Memory::Read_Opcode_JIT(js.compilerPC); js.downcountAmount += MIPSGetInstructionCycleEstimate(inst); MIPSCompileOp(inst); @@ -315,7 +315,7 @@ const u8 *Jit::DoJit(u32 em_address, JitBlock *b) if (logBlocks > 0 && dontLogBlocks == 0) { INFO_LOG(JIT, "=============== mips ==============="); for (u32 cpc = em_address; cpc != js.compilerPC + 4; cpc += 4) { - MIPSDisAsm(Memory::Read_Instruction(cpc), cpc, temp, true); + MIPSDisAsm(Memory::Read_Opcode_JIT(cpc), cpc, temp, true); INFO_LOG(JIT, "M: %08x %s", cpc, temp); } } diff --git a/Core/MemMap.cpp b/Core/MemMap.cpp index ea7d015516..7c87355197 100644 --- a/Core/MemMap.cpp +++ b/Core/MemMap.cpp @@ -416,7 +416,7 @@ static Opcode Read_Instruction(u32 address, bool resolveReplacements, Opcode ins } else { return inst; } - } else if (MIPS_IS_REPLACEMENT(inst.encoding)) { + } else if (resolveReplacements && MIPS_IS_REPLACEMENT(inst.encoding)) { u32 op; if (GetReplacedOpAt(address, &op)) { if (MIPS_IS_EMUHACK(op)) {