powerpc/sstep: mullw should calculate a 64 bit signed result
mullw should do a 32 bit signed multiply and create a 64 bit signed result. It currently truncates the result to 32 bits. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
committed by
Michael Ellerman
parent
5bcaa4cc41
commit
1575fe06f6
@@ -1651,8 +1651,9 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
|
|||||||
goto arith_done;
|
goto arith_done;
|
||||||
|
|
||||||
case 235: /* mullw */
|
case 235: /* mullw */
|
||||||
op->val = (unsigned int) regs->gpr[ra] *
|
op->val = (long)(int) regs->gpr[ra] *
|
||||||
(unsigned int) regs->gpr[rb];
|
(int) regs->gpr[rb];
|
||||||
|
|
||||||
goto arith_done;
|
goto arith_done;
|
||||||
|
|
||||||
case 266: /* add */
|
case 266: /* add */
|
||||||
|
|||||||
Reference in New Issue
Block a user