From 2abbda924bc7539905a80b044dac812240ef5a70 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 21 Dec 2022 15:49:40 +1000 Subject: [PATCH] x86/iR5900: Ignore double jr/jalr branches like others --- pcsx2/x86/ix86-32/iR5900-32.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pcsx2/x86/ix86-32/iR5900-32.cpp b/pcsx2/x86/ix86-32/iR5900-32.cpp index f109a895cb..027dd447be 100644 --- a/pcsx2/x86/ix86-32/iR5900-32.cpp +++ b/pcsx2/x86/ix86-32/iR5900-32.cpp @@ -1835,6 +1835,16 @@ void recompileNextInstruction(bool delayslot, bool swapped_delay_slot) bool check_branch_delay = false; switch (_Opcode_) { + case 0: + switch (_Funct_) + { + case 8: // jr + case 9: // jalr + check_branch_delay = true; + break; + } + break; + case 1: switch (_Rt_) { @@ -1847,6 +1857,7 @@ void recompileNextInstruction(bool delayslot, bool swapped_delay_slot) case 0x12: case 0x13: check_branch_delay = true; + break; } break; @@ -1861,6 +1872,7 @@ void recompileNextInstruction(bool delayslot, bool swapped_delay_slot) case 0x16: case 0x17: check_branch_delay = true; + break; } // Check for branch in delay slot, new code by FlatOut. // Gregory tested this in 2017 using the ps2autotests suite and remarked "So far we return 1 (even with this PR), and the HW 2.