diff options
| author | skidau <skidau@gmail.com> | 2012-04-28 22:47:55 +1000 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2012-04-28 22:47:55 +1000 |
| commit | 853d12b42c19a4febef0fa19f4d88ae7bf5f0367 (patch) | |
| tree | 32a77bf9c92101cd8a70a2dfef891d7f8d94f8aa /Source | |
| parent | 103e73030fcb882ba3bacc36d5f30480c12df73e (diff) | |
Changed the performance monitor check to a compile time check instead of run-time.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp | 7 | ||||
| -rw-r--r-- | Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp index 5db67c2cd7..57fd1e4366 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp @@ -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) diff --git a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp index c944522c4d..34608c7b46 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp @@ -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) |
