diff --git a/Core/MIPS/ARM/ArmJit.cpp b/Core/MIPS/ARM/ArmJit.cpp index 91818de20b..ac9b97e5eb 100644 --- a/Core/MIPS/ARM/ArmJit.cpp +++ b/Core/MIPS/ARM/ArmJit.cpp @@ -154,6 +154,7 @@ void Jit::EatInstruction(MIPSOpcode op) { ERROR_LOG_REPORT_ONCE(ateInDelaySlot, JIT, "Ate an instruction inside a delay slot.") } + js.numInstructions++; js.compilerPC += 4; js.downcountAmount += MIPSGetInstructionCycleEstimate(op); } @@ -256,10 +257,9 @@ const u8 *Jit::DoJit(u32 em_address, JitBlock *b) gpr.Start(analysis); fpr.Start(analysis); - int numInstructions = 0; - int cycles = 0; int partialFlushOffset = 0; + js.numInstructions = 0; while (js.compiling) { gpr.SetCompilerPC(js.compilerPC); // Let it know for log messages @@ -270,7 +270,7 @@ const u8 *Jit::DoJit(u32 em_address, JitBlock *b) MIPSCompileOp(inst); js.compilerPC += 4; - numInstructions++; + js.numInstructions++; if (!cpu_info.bArmV7 && (GetCodePtr() - b->checkedEntry - partialFlushOffset) > 3200) { // We need to prematurely flush as we are out of range @@ -320,7 +320,7 @@ const u8 *Jit::DoJit(u32 em_address, JitBlock *b) // Don't forget to zap the newly written instructions in the instruction cache! FlushIcache(); - b->originalSize = numInstructions; + b->originalSize = js.numInstructions; return b->normalEntry; }