aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/mulh.h
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>2010-08-03 20:48:02 -0700
committerAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>2010-08-03 20:48:02 -0700
commit5ff63bcd7935cad840fd25844dfb590010bd2e12 (patch)
tree4efe8f8953dd229f1e3342e59108888296c99c46 /riscv/insns/mulh.h
parent864c3ef8ac39c27dec64adae6a1611755dfbada7 (diff)
downloadspike-5ff63bcd7935cad840fd25844dfb590010bd2e12.zip
spike-5ff63bcd7935cad840fd25844dfb590010bd2e12.tar.gz
spike-5ff63bcd7935cad840fd25844dfb590010bd2e12.tar.bz2
[pk,sim,xcc] Renamed instructions to RISC-V spec
All word-sized arithmetic operations are now postfixed with 'w', and all double-word-sized arithmetic operations are no longer prefixed with 'd'. mtc0/mfc0 are removed and replaced with mfpcr/mtpcr/mwfpcr/mwtpcr.
Diffstat (limited to 'riscv/insns/mulh.h')
-rw-r--r--riscv/insns/mulh.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/riscv/insns/mulh.h b/riscv/insns/mulh.h
index 90a17be..2d7ca4c 100644
--- a/riscv/insns/mulh.h
+++ b/riscv/insns/mulh.h
@@ -1,2 +1,4 @@
-RC = sext32((sreg_t(RA) * sreg_t(RB)) >> 32);
-
+require64;
+int64_t rb = RA;
+int64_t ra = RB;
+RC = (int128_t(rb) * int128_t(ra)) >> 64;