diff options
author | Yunsup Lee <yunsup@cs.berkeley.edu> | 2012-01-30 14:38:23 -0800 |
---|---|---|
committer | Yunsup Lee <yunsup@cs.berkeley.edu> | 2012-01-30 14:38:23 -0800 |
commit | b5f4f0ef3139b103d7406c897cb67224625f4c2b (patch) | |
tree | 411707443daf51ab5e01dd6c7921300bf67a64db /riscv/insns/remuw.h | |
parent | 63bf7dd26ed86a95d0c1080847d8d629a931560a (diff) | |
download | spike-b5f4f0ef3139b103d7406c897cb67224625f4c2b.zip spike-b5f4f0ef3139b103d7406c897cb67224625f4c2b.tar.gz spike-b5f4f0ef3139b103d7406c897cb67224625f4c2b.tar.bz2 |
fix divide by zero bugs
Diffstat (limited to 'riscv/insns/remuw.h')
-rw-r--r-- | riscv/insns/remuw.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/insns/remuw.h b/riscv/insns/remuw.h index 8234af3..1cc015d 100644 --- a/riscv/insns/remuw.h +++ b/riscv/insns/remuw.h @@ -1,5 +1,5 @@ require_xpr64; -if(RS2 == 0) +if(zext_xprlen(RS2) == 0) RD = RS1; else RD = sext32(zext_xprlen(RS1) % zext_xprlen(RS2)); |