-WRITE_RD(sext_xlen(rv_sr(sext_xlen(RS1),
- rv_and(RS2, sv_reg_t(xlen-1)))));
+WRITE_RD(sext_xlen(rv_sr(sext_xlen(RS1), RS2, xlen)));
require(rv_lt(SHAMT, sv_reg_t(xlen)));
-WRITE_RD(sext_xlen(rv_sr(sext_xlen(RS1), SHAMT)));
+WRITE_RD(sext_xlen(rv_sr(sext_xlen(RS1), SHAMT, 64)));
require_rv64;
-WRITE_RD(sext32(rv_sr(sv_reg_int32(RS1), SHAMT)));
+WRITE_RD(sext32(rv_sr(sv_reg_int32(RS1), SHAMT, 64)));
require_rv64;
-WRITE_RD(sext32(rv_sr(sv_reg_int32(RS1), RS2, 0x1FU)));
+WRITE_RD(sext32(rv_sr(sv_reg_int32(RS1), RS2, 32U)));
-WRITE_RD(sext_xlen(rv_sr(zext_xlen(RS1),
- rv_and(RS2, sv_reg_t(xlen-1)))));
+WRITE_RD(sext_xlen(rv_sr(zext_xlen(RS1), RS2, xlen)));
require(rv_lt(SHAMT, sv_reg_t(xlen)));
-WRITE_RD(sext_xlen(rv_sr(zext_xlen(RS1), SHAMT)));
+WRITE_RD(sext_xlen(rv_sr(zext_xlen(RS1), SHAMT, 64)));
require_rv64;
-WRITE_RD(sext32(rv_sr(sv_reg_uint32(RS1), SHAMT)));
+WRITE_RD(sext32(rv_sr(sv_reg_uint32(RS1), SHAMT, 64)));
require_rv64;
-WRITE_RD(sext32(rv_sr(sv_reg_uint32(RS1),
- rv_and(RS2, sv_reg_t(0x1FU)))));
+WRITE_RD(sext32(rv_sr(sv_reg_uint32(RS1), RS2, 32U)));