CachedInterpreter: Use `CodeOp::canEndBlock`

This was a bigger performance boost than I expected.
This commit is contained in:
mitaclaw 2024-05-05 00:48:40 -07:00
parent 818647d694
commit ae43b10eff
1 changed files with 3 additions and 4 deletions

View File

@ -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});
}
}