Browse Source

fixed a bug in remu[w]

it was actually caught by the ASM tests... :(
eos18-bringup
Andrew Waterman 15 years ago
parent
commit
cbaa604cda
  1. 2
      riscv/insns/remu.h
  2. 2
      riscv/insns/remuw.h

2
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);

2
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);

Loading…
Cancel
Save