require_extension('F');
require_fp;
softfloat_roundingMode = RM;
-WRITE_FRD(ui32_to_f32((uint32_t)RS1));
+WRITE_FRD(ui32_to_f32(sv_reg_uint32(RS1)));
set_fp_exceptions;
require_extension('D');
require_fp;
-WRITE_FRD(f64(MMU.load_uint64(RS1 + insn.i_imm())));
+WRITE_FRD(f64(MMU.load_uint64(rv_add(RS1, insn.i_imm()))));
require_extension('Q');
require_fp;
-WRITE_FRD(MMU.load_float128(RS1 + insn.i_imm()));
+WRITE_FRD(MMU.load_float128(rv_add(RS1, insn.i_imm())));
require_extension('F');
require_fp;
-WRITE_FRD(f32(MMU.load_uint32(RS1 + insn.i_imm())));
+WRITE_FRD(f32(MMU.load_uint32(rv_add(RS1, insn.i_imm()))));
require_extension('F');
require_fp;
-WRITE_RD(sext32(FRS1.v[0]));
+WRITE_RD(sext32(sv_reg_t(FRS1.v[0])));
require_extension('D');
require_fp;
-MMU.store_uint64(RS1 + insn.s_imm(), FRS2.v[0]);
+MMU.store_uint64(rv_add(RS1, insn.s_imm()), FRS2.v[0]);
require_extension('Q');
require_fp;
-MMU.store_float128(RS1 + insn.s_imm(), FRS2);
+MMU.store_float128(rv_add(RS1, insn.s_imm()), FRS2);
require_extension('F');
require_fp;
-MMU.store_uint32(RS1 + insn.s_imm(), FRS2.v[0]);
+MMU.store_uint32(rv_add(RS1, insn.s_imm()), FRS2.v[0]);