From ae43b10eff153c0322fcc254e1f63a92a8581d2e Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Sun, 5 May 2024 00:48:40 -0700 Subject: [PATCH] CachedInterpreter: Use `CodeOp::canEndBlock` This was a bigger performance boost than I expected. --- .../Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp b/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp index 745dc9c9b3..98534ed903 100644 --- a/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp +++ b/Source/Core/Core/PowerPC/CachedInterpreter/CachedInterpreter.cpp @@ -344,18 +344,17 @@ bool CachedInterpreter::DoJit(u32 em_address, JitBlock* b, u32 nextPC) js.firstFPInstructionFound = true; } - const bool endblock = (op.opinfo->flags & FL_ENDBLOCK) != 0; - if (endblock) + if (op.canEndBlock) Write(WritePC, {js.compilerPC}); Write(Interpret, {interpreter, Interpreter::GetInterpreterOp(op.inst), js.compilerPC, op.inst}); if (jo.memcheck && (op.opinfo->flags & FL_LOADSTORE) != 0) Write(CheckDSI, {power_pc, js.compilerPC, js.downcountAmount}); - if (!endblock && ShouldHandleFPExceptionForInstruction(&op)) + if (!op.canEndBlock && ShouldHandleFPExceptionForInstruction(&op)) Write(CheckProgramException, {power_pc, js.compilerPC, js.downcountAmount}); if (op.branchIsIdleLoop) Write(CheckIdle, {m_system.GetCoreTiming(), js.blockStart}); - if (endblock) + if (op.canEndBlock) Write(EndBlock, {js.downcountAmount, js.numLoadStoreInst, js.numFloatingPointInst}); } }