armjit: keep track of instructions in jitstate.

To match x86.
This commit is contained in:
Unknown W. Brackets 2013-11-10 21:06:12 -08:00
parent 8ceaafc159
commit 92ecff4396

View File

@ -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;
}