projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bcaa4c
)
powerpc/sstep: mullw should calculate a 64 bit signed result
author
Anton Blanchard
<anton@samba.org>
Tue, 19 Sep 2017 23:32:19 +0000
(09:32 +1000)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Wed, 20 Sep 2017 03:30:09 +0000
(13:30 +1000)
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>
arch/powerpc/lib/sstep.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/powerpc/lib/sstep.c
b/arch/powerpc/lib/sstep.c
index c4cda1afb49d3e0fe597040f8fa8580cc944f0bf..5e8418c28bd884bd854818755b61b06fcff776e6 100644
(file)
--- a/
arch/powerpc/lib/sstep.c
+++ b/
arch/powerpc/lib/sstep.c
@@
-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 */