Debugger: Ignore bctr when stepping out

This commit is contained in:
VampireFlower 2025-11-04 11:41:48 -05:00
parent 40fa9ddadd
commit 294044a02e
2 changed files with 2 additions and 2 deletions

View File

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

View File

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