Changed the performance monitor check to a compile time check instead of run-time.

This commit is contained in:
skidau 2012-04-28 22:47:55 +10:00
parent cdace9d776
commit 389823a749
2 changed files with 6 additions and 8 deletions

View file

@ -296,10 +296,9 @@ void Jit64::Cleanup()
if (jo.optimizeGatherPipe && js.fifoBytesThisBlock > 0)
ABI_CallFunction((void *)&GPFifo::CheckGatherPipe);
CMP(32, M(&MMCR0), Imm32(0));
FixupBranch mmcr0 = J_CC(CC_Z);
ABI_CallFunctionCCC((void *)&PowerPC::UpdatePerformanceMonitor, js.downcountAmount, jit->js.numLoadStoreInst, jit->js.numFloatingPointInst);
SetJumpTarget(mmcr0);
// SPEED HACK: MMCR0/MMCR1 should be checked at run-time, not at compile time.
if (MMCR0.Hex || MMCR1.Hex)
ABI_CallFunctionCCC((void *)&PowerPC::UpdatePerformanceMonitor, js.downcountAmount, jit->js.numLoadStoreInst, jit->js.numFloatingPointInst);
}
void Jit64::WriteExit(u32 destination, int exit_num)

View file

@ -391,10 +391,9 @@ void JitIL::Cleanup()
if (jo.optimizeGatherPipe && js.fifoBytesThisBlock > 0)
ABI_CallFunction((void *)&GPFifo::CheckGatherPipe);
CMP(32, M(&MMCR0), Imm32(0));
FixupBranch mmcr0 = J_CC(CC_Z);
ABI_CallFunctionCCC((void *)&PowerPC::UpdatePerformanceMonitor, js.downcountAmount, jit->js.numLoadStoreInst, jit->js.numFloatingPointInst);
SetJumpTarget(mmcr0);
// SPEED HACK: MMCR0/MMCR1 should be checked at run-time, not at compile time.
if (MMCR0.Hex || MMCR1.Hex)
ABI_CallFunctionCCC((void *)&PowerPC::UpdatePerformanceMonitor, js.downcountAmount, jit->js.numLoadStoreInst, jit->js.numFloatingPointInst);
}
void JitIL::WriteExit(u32 destination, int exit_num)