aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/mulhu.h
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2014-09-27 11:01:22 -0700
committerAndrew Waterman <waterman@cs.berkeley.edu>2014-09-27 11:10:49 -0700
commitbaa8d8be1f1a3d83caf248533fda9abaa3b0ee70 (patch)
tree6fb99977824fefff067f34d7915fcefbc72e6043 /riscv/insns/mulhu.h
parenteb27fce99c6f711a890c8647edaf077ec8d137d3 (diff)
downloadspike-baa8d8be1f1a3d83caf248533fda9abaa3b0ee70.zip
spike-baa8d8be1f1a3d83caf248533fda9abaa3b0ee70.tar.gz
spike-baa8d8be1f1a3d83caf248533fda9abaa3b0ee70.tar.bz2
Avoid use of __int128_t
It is nonstandard, and GCC doesn't support it on 32-bit platforms. The resulting code for MULH[[S]U] is crappier, but that doesn't really matter, as these instructions are dynamically infrequent.
Diffstat (limited to 'riscv/insns/mulhu.h')
-rw-r--r--riscv/insns/mulhu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/riscv/insns/mulhu.h b/riscv/insns/mulhu.h
index 2d6f48c..b03b870 100644
--- a/riscv/insns/mulhu.h
+++ b/riscv/insns/mulhu.h
@@ -1,4 +1,4 @@
-if(xpr64)
- WRITE_RD((uint128_t(RS1) * uint128_t(RS2)) >> 64);
+if (xpr64)
+ WRITE_RD(mulhu(RS1, RS2));
else
WRITE_RD(sext32(((uint64_t)(uint32_t)RS1 * (uint64_t)(uint32_t)RS2) >> 32));