diff --git a/Core/MIPS/ARM/ArmJit.cpp b/Core/MIPS/ARM/ArmJit.cpp index 0794ebc22f..0f138c6092 100644 --- a/Core/MIPS/ARM/ArmJit.cpp +++ b/Core/MIPS/ARM/ArmJit.cpp @@ -566,6 +566,7 @@ void ArmJit::Comp_ReplacementFunc(MIPSOpcode op) } } else if (entry->replaceFunc) { FlushAll(); + SaveDowncount(); RestoreRoundingMode(); gpr.SetRegImm(SCRATCHREG1, GetCompilerPC()); MovToPC(SCRATCHREG1); @@ -582,9 +583,11 @@ void ArmJit::Comp_ReplacementFunc(MIPSOpcode op) if (entry->flags & (REPFLAG_HOOKENTER | REPFLAG_HOOKEXIT)) { // Compile the original instruction at this address. We ignore cycles for hooks. ApplyRoundingMode(); + RestoreDowncount(); MIPSCompileOp(Memory::Read_Instruction(GetCompilerPC(), true), this); } else { ApplyRoundingMode(); + RestoreDowncount(); LDR(R1, CTXREG, MIPS_REG_RA * 4); WriteDownCountR(R0); WriteExitDestInR(R1);