CachedInterpreter: Exception Check Callback Micro-Optimization
This saves two register pushes / pops.
This commit is contained in:
parent
f79520a906
commit
0282fa7adb
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue