Merge pull request #14070 from VampireFlower/master

Debugger: Ignore bctr when stepping out
This commit is contained in:
JMC47 2025-11-11 20:57:45 -05:00 committed by GitHub
commit b8236d4662
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ union UGeckoInstruction
struct struct
{ {
u32 LK_3 : 1; u32 LK_3 : 1;
u32 : 10; u32 XO : 10;
u32 : 5; u32 : 5;
u32 BI_2 : 5; u32 BI_2 : 5;
u32 BO_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(); 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 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 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; return isBclr && counter && condition && !inst.LK_3;
} }