From: Luke Kenneth Casson Leighton Date: Thu, 18 Oct 2018 22:27:24 +0000 (+0100) Subject: divu X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a92ce5a6605ed0585dbb0b5c290dcf236d2fc15;p=riscv-isa-sim.git divu --- diff --git a/riscv/insns/divu.h b/riscv/insns/divu.h index 30225fb..ddae72d 100644 --- a/riscv/insns/divu.h +++ b/riscv/insns/divu.h @@ -1,7 +1,7 @@ require_extension('M'); -reg_t lhs = zext_xlen(RS1); -reg_t rhs = zext_xlen(RS2); -if(rhs == 0) +sv_reg_t lhs = zext_xlen(RS1); +sv_reg_t rhs = zext_xlen(RS2); +if(rv_eq(rhs, sv_reg_t(0))) WRITE_RD(UINT64_MAX); else WRITE_RD(sext_xlen(rv_div(lhs, rhs)));