aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/mulhsu.h
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>2011-04-08 16:34:35 -0700
committerAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>2011-04-08 16:34:35 -0700
commit98598ca5e2b27a49292e6dd6fd444c7838824d5a (patch)
tree865d1009329297fc9d3f7ded8e721413ffeb90e1 /riscv/insns/mulhsu.h
parentdde934bb5bee61a730ea9407c9a086c4b0c1827a (diff)
downloadspike-98598ca5e2b27a49292e6dd6fd444c7838824d5a.zip
spike-98598ca5e2b27a49292e6dd6fd444c7838824d5a.tar.gz
spike-98598ca5e2b27a49292e6dd6fd444c7838824d5a.tar.bz2
[sim] fixed multiply-high in rv32
Diffstat (limited to 'riscv/insns/mulhsu.h')
-rw-r--r--riscv/insns/mulhsu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/insns/mulhsu.h b/riscv/insns/mulhsu.h
index 506424d..e5f1c95 100644
--- a/riscv/insns/mulhsu.h
+++ b/riscv/insns/mulhsu.h
@@ -5,4 +5,4 @@ if(xpr64)
RD = (int128_t(a) * uint128_t(b)) >> 64;
}
else
- RD = sext32((sreg_t(RS1) * reg_t(RS2)) >> 32);
+ RD = sext32((sreg_t(RS1) * reg_t((uint32_t)RS2)) >> 32);