require_extension('M');
require_rv64;
-sreg_t lhs = sext32(RS1);
-sreg_t rhs = sext32(RS2);
-if(rhs == 0)
+sv_sreg_t lhs = sext32(RS1);
+sv_sreg_t rhs = sext32(RS2);
+if(rv_eq(rhs, sv_reg_t(0)))
WRITE_RD(UINT64_MAX);
else
WRITE_RD(sext32(rv_div(lhs, rhs)));
require_extension('D');
require_fp;
softfloat_roundingMode = RM;
-WRITE_FRD(i32_to_f64((int32_t)RS1));
+WRITE_FRD(i32_to_f64(sv_reg_int32(RS1)));
set_fp_exceptions;
require_extension('D');
require_fp;
softfloat_roundingMode = RM;
-WRITE_FRD(ui32_to_f64((uint32_t)RS1));
+WRITE_FRD(ui32_to_f64(sv_reg_uint32(RS1)));
set_fp_exceptions;
require_extension('Q');
require_fp;
softfloat_roundingMode = RM;
-WRITE_FRD(i32_to_f128((int32_t)RS1));
+WRITE_FRD(i32_to_f128(sv_reg_int32(RS1)));
set_fp_exceptions;
require_extension('Q');
require_fp;
softfloat_roundingMode = RM;
-WRITE_FRD(ui32_to_f128((uint32_t)RS1));
+WRITE_FRD(ui32_to_f128(sv_reg_uint32(RS1)));
set_fp_exceptions;
require_extension('F');
require_fp;
softfloat_roundingMode = RM;
-WRITE_FRD(i32_to_f32((int32_t)RS1));
+WRITE_FRD(i32_to_f32(sv_reg_int32(RS1)));
set_fp_exceptions;