Debugger: Remove delay slot for ERET and SYSCALL opcodes

This commit is contained in:
kozarovv 2020-10-25 17:51:00 +01:00 committed by refractionpcsx2
parent 5a77ed14bf
commit 4b4fa06432
1 changed files with 6 additions and 1 deletions

View File

@ -756,6 +756,11 @@ inline bool isBranchOrJump(u32 addr)
u32 op = memRead32(addr);
const OPCODE& opcode = GetInstruction(op);
// Return false for eret & syscall as they are branch type in pcsx2 debugging tools,
// but shouldn't have delay slot in isBreakpointNeeded/isMemcheckNeeded.
if ((opcode.flags == (IS_BRANCH | BRANCHTYPE_SYSCALL)) || (opcode.flags == (IS_BRANCH | BRANCHTYPE_ERET)))
return false;
return (opcode.flags & IS_BRANCH) != 0;
}