From cbaa604cda1c93357e7c08b4aeb9b36c6601c2b7 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Sun, 19 Feb 2012 23:18:58 -0800 Subject: fixed a bug in remu[w] it was actually caught by the ASM tests... :( --- riscv/insns/remuw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'riscv/insns/remuw.h') diff --git a/riscv/insns/remuw.h b/riscv/insns/remuw.h index aac13fb..1ef810c 100644 --- a/riscv/insns/remuw.h +++ b/riscv/insns/remuw.h @@ -2,6 +2,6 @@ require_xpr64; reg_t lhs = zext32(RS1); reg_t rhs = zext32(RS2); if(rhs == 0) - RD = lhs; + RD = sext32(lhs); else RD = sext32(lhs % rhs); -- cgit v1.1