Skip to content

Commit 151c32b

Browse files
balamuruhansmpe
authored andcommitted
powerpc/sstep: Add support for divde[.] and divdeu[.] instructions
This patch adds emulation support for divde, divdeu instructions, - Divide Doubleword Extended (divde[.]) - Divide Doubleword Extended Unsigned (divdeu[.]) Signed-off-by: Balamuruhan S <bala24@linux.ibm.com> Reviewed-by: Sandipan Das <sandipan@linux.ibm.com> Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200728130308.1790982-3-bala24@linux.ibm.com
1 parent 8902c6f commit 151c32b

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎arch/powerpc/lib/sstep.c‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1806,7 +1806,18 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
18061806
op->val = (int) regs->gpr[ra] /
18071807
(int) regs->gpr[rb];
18081808
goto arith_done;
1809-
1809+
#ifdef __powerpc64__
1810+
case 425: /* divde[.] */
1811+
asm volatile(PPC_DIVDE(%0, %1, %2) :
1812+
"=r" (op->val) : "r" (regs->gpr[ra]),
1813+
"r" (regs->gpr[rb]));
1814+
goto arith_done;
1815+
case 393: /* divdeu[.] */
1816+
asm volatile(PPC_DIVDEU(%0, %1, %2) :
1817+
"=r" (op->val) : "r" (regs->gpr[ra]),
1818+
"r" (regs->gpr[rb]));
1819+
goto arith_done;
1820+
#endif
18101821
case 755: /* darn */
18111822
if (!cpu_has_feature(CPU_FTR_ARCH_300))
18121823
return -1;

0 commit comments

Comments
 (0)