From 294044a02ed1daf38384a80358452b14c60f0232 Mon Sep 17 00:00:00 2001 From: VampireFlower Date: Tue, 4 Nov 2025 11:41:48 -0500 Subject: [PATCH] Debugger: Ignore bctr when stepping out --- Source/Core/Core/PowerPC/Gekko.h | 2 +- Source/Core/DolphinQt/Debugger/CodeWidget.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/PowerPC/Gekko.h b/Source/Core/Core/PowerPC/Gekko.h index 12d6a6bcc8d..c90bb26a1a9 100644 --- a/Source/Core/Core/PowerPC/Gekko.h +++ b/Source/Core/Core/PowerPC/Gekko.h @@ -87,7 +87,7 @@ union UGeckoInstruction struct { u32 LK_3 : 1; - u32 : 10; + u32 XO : 10; u32 : 5; u32 BI_2 : 5; u32 BO_2 : 5; diff --git a/Source/Core/DolphinQt/Debugger/CodeWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeWidget.cpp index 3e4eedf49dc..a04f761cee3 100644 --- a/Source/Core/DolphinQt/Debugger/CodeWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/CodeWidget.cpp @@ -603,7 +603,7 @@ static bool WillInstructionReturn(Core::System& system, UGeckoInstruction inst) const auto& ppc_state = system.GetPPCState(); bool counter = (inst.BO_2 >> 2 & 1) != 0 || (CTR(ppc_state) != 0) != ((inst.BO_2 >> 1 & 1) != 0); bool condition = inst.BO_2 >> 4 != 0 || ppc_state.cr.GetBit(inst.BI_2) == (inst.BO_2 >> 3 & 1); - bool isBclr = inst.OPCD_7 == 0b010011 && (inst.hex >> 1 & 0b10000) != 0; + bool isBclr = inst.OPCD_7 == 0b010011 && inst.XO == 16; return isBclr && counter && condition && !inst.LK_3; }