In AIX, power 10 instructions like paddi occupy 8 bytes, while the other instructions
4 bytes of space. Due to this when we do a stepi on paddi instruction we get a SIGILL interrupt. Hence, we
need to check during stepi if we are able to step 8 bytes during this instruction execution and is the
breakpoint to this instruction set correctly in both 32- and 64-bit mode.
This patch is a fix to the same.
if (!next_pcs.empty ())
return next_pcs;
- breaks[0] = loc + PPC_INSN_SIZE;
+ /* Here 0xfc000000 is the opcode mask to detect a P10 prefix instruction. */
+ if ((insn & 0xfc000000) == 1 << 26)
+ breaks[0] = loc + 2 * PPC_INSN_SIZE;
+ else
+ breaks[0] = loc + PPC_INSN_SIZE;
opcode = insn >> 26;
breaks[1] = branch_dest (regcache, opcode, insn, loc, breaks[0]);