else if(lhs == INT64_MIN && rhs == -1)
WRITE_RD(0);
else
- WRITE_RD(sext_xlen(lhs % rhs));
+ WRITE_RD(sext_xlen(rv_rem(lhs, rhs)));
if(rhs == 0)
WRITE_RD(sext_xlen(RS1));
else
- WRITE_RD(sext_xlen(lhs % rhs));
+ WRITE_RD(sext_xlen(rv_rem(lhs, rhs)));
if(rhs == 0)
WRITE_RD(sext32(lhs));
else
- WRITE_RD(sext32(lhs % rhs));
+ WRITE_RD(sext32(rv_rem(lhs, rhs)));
if(rhs == 0)
WRITE_RD(lhs);
else
- WRITE_RD(sext32(lhs % rhs));
+ WRITE_RD(sext32(rv_rem(lhs, rhs)));
return lhs / rhs;
}
+sreg_t sv_proc_t::rv_rem(sreg_t lhs, sreg_t rhs)
+{
+ return lhs % rhs;
+}
+
+reg_t sv_proc_t::rv_rem(reg_t lhs, reg_t rhs)
+{
+ return lhs % rhs;
+}
+
reg_t sv_proc_t::rv_mul(reg_t lhs, reg_t rhs)
{
return lhs * rhs;
reg_t rv_sub(reg_t lhs, reg_t rhs);
reg_t rv_div(reg_t lhs, reg_t rhs);
sreg_t rv_div(sreg_t lhs, sreg_t rhs);
+ reg_t rv_rem(reg_t lhs, reg_t rhs);
+ sreg_t rv_rem(sreg_t lhs, sreg_t rhs);
reg_t rv_mul(reg_t lhs, reg_t rhs);
reg_t rv_and(reg_t lhs, reg_t rhs);
reg_t rv_or(reg_t lhs, reg_t rhs);