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

View File

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