divuw
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 18 Oct 2018 22:28:24 +0000 (23:28 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 18 Oct 2018 22:28:24 +0000 (23:28 +0100)
riscv/insns/divuw.h

index 2fba815962a320749fe7fccf821bb360204132c7..34619f2afb34d1042a8cd5a65bfd26aa30dbdce9 100644 (file)
@@ -1,8 +1,8 @@
 require_extension('M');
 require_rv64;
-reg_t lhs = zext32(RS1);
-reg_t rhs = zext32(RS2);
-if(rhs == 0)
+sv_reg_t lhs = zext32(RS1);
+sv_reg_t rhs = zext32(RS2);
+if(rv_eq(rhs, sv_reg_t(0)))
   WRITE_RD(UINT64_MAX);
 else
   WRITE_RD(sext32(rv_div(lhs, rhs)));