summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authormitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-04-20 05:16:05 -0700
committermitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-07-23 14:06:22 -0700
commit0282fa7adbeea737bfdb8f11570d6d17ea94d47b (patch)
tree1577f4165904761ecaf90ae7a941dbd0f1b9511e /Source/Core
parentf79520a90601e20c887055761cd6c7ab0463f329 (diff)
CachedInterpreter: Exception Check Callback Micro-Optimization
This saves two register pushes / pops.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp b/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp
index 7e740b5de9..82b8058e7a 100644
--- a/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp
+++ b/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp
@@ -135,9 +135,9 @@ s32 CachedInterpreter::CheckFPU(PowerPC::PowerPCState& ppc_state, const CheckHal
const auto& [power_pc, downcount] = operands;
if (!ppc_state.msr.FP)
{
+ ppc_state.downcount -= downcount;
ppc_state.Exceptions |= EXCEPTION_FPU_UNAVAILABLE;
power_pc.CheckExceptions();
- ppc_state.downcount -= downcount;
return 0;
}
return sizeof(AnyCallback) + sizeof(operands);
@@ -148,8 +148,8 @@ s32 CachedInterpreter::CheckDSI(PowerPC::PowerPCState& ppc_state, const CheckHal
const auto& [power_pc, downcount] = operands;
if ((ppc_state.Exceptions & EXCEPTION_DSI) != 0)
{
- power_pc.CheckExceptions();
ppc_state.downcount -= downcount;
+ power_pc.CheckExceptions();
return 0;
}
return sizeof(AnyCallback) + sizeof(operands);
@@ -161,8 +161,8 @@ s32 CachedInterpreter::CheckProgramException(PowerPC::PowerPCState& ppc_state,
const auto& [power_pc, downcount] = operands;
if ((ppc_state.Exceptions & EXCEPTION_PROGRAM) != 0)
{
- power_pc.CheckExceptions();
ppc_state.downcount -= downcount;
+ power_pc.CheckExceptions();
return 0;
}
return sizeof(AnyCallback) + sizeof(operands);