iR5900 Recompiler: Skip exception handling for (i)FlushCache

This commit is contained in:
Ty Lamontagne 2023-09-13 12:24:29 -04:00 committed by refractionpcsx2
parent 9c4fdc18b8
commit b36e2eb5f4
1 changed files with 6 additions and 1 deletions

View File

@ -740,7 +740,12 @@ static void recExecute()
void R5900::Dynarec::OpcodeImpl::recSYSCALL()
{
EE::Profiler.EmitOp(eeOpcode::SYSCALL);
if (GPR_IS_CONST1(3))
{
// If it's FlushCache or iFlushCache, we can skip it since we don't support cache in the JIT.
if (g_cpuConstRegs[3].UC[0] == 0x64 || g_cpuConstRegs[3].UC[0] == 0x68)
return;
}
recCall(R5900::Interpreter::OpcodeImpl::SYSCALL);
g_branch = 2; // Indirect branch with event check.
}