aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/remu.h
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@eecs.berkeley.edu>2012-02-19 23:18:58 -0800
committerAndrew Waterman <waterman@eecs.berkeley.edu>2012-02-19 23:18:58 -0800
commitcbaa604cda1c93357e7c08b4aeb9b36c6601c2b7 (patch)
treec05bdce77d8af0a467fb86d97b63d4cec9f3ffdc /riscv/insns/remu.h
parent1536af0c020ef41859ad52a79ffeda0b43514718 (diff)
downloadspike-cbaa604cda1c93357e7c08b4aeb9b36c6601c2b7.zip
spike-cbaa604cda1c93357e7c08b4aeb9b36c6601c2b7.tar.gz
spike-cbaa604cda1c93357e7c08b4aeb9b36c6601c2b7.tar.bz2
fixed a bug in remu[w]
it was actually caught by the ASM tests... :(
Diffstat (limited to 'riscv/insns/remu.h')
-rw-r--r--riscv/insns/remu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/insns/remu.h b/riscv/insns/remu.h
index ca66318..1057789 100644
--- a/riscv/insns/remu.h
+++ b/riscv/insns/remu.h
@@ -1,6 +1,6 @@
reg_t lhs = zext_xprlen(RS1);
reg_t rhs = zext_xprlen(RS2);
if(rhs == 0)
- RD = lhs;
+ RD = sext_xprlen(RS1);
else
RD = sext_xprlen(lhs % rhs);