From b36e2eb5f4229825a269152a0f1d65e31e69f696 Mon Sep 17 00:00:00 2001 From: Ty Lamontagne Date: Wed, 13 Sep 2023 12:24:29 -0400 Subject: [PATCH] iR5900 Recompiler: Skip exception handling for (i)FlushCache --- pcsx2/x86/ix86-32/iR5900.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pcsx2/x86/ix86-32/iR5900.cpp b/pcsx2/x86/ix86-32/iR5900.cpp index 37057a289e..7e53c58dee 100644 --- a/pcsx2/x86/ix86-32/iR5900.cpp +++ b/pcsx2/x86/ix86-32/iR5900.cpp @@ -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. }