Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1575fe06 authored by Anton Blanchard's avatar Anton Blanchard Committed by Michael Ellerman
Browse files

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: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 5bcaa4cc
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1651,8 +1651,9 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
			goto arith_done;

		case 235:	/* mullw */
			op->val = (unsigned int) regs->gpr[ra] *
				(unsigned int) regs->gpr[rb];
			op->val = (long)(int) regs->gpr[ra] *
				(int) regs->gpr[rb];

			goto arith_done;

		case 266:	/* add */