#define CLR_SV_CSRS( ) csrrw x0, 0x4c0, 0
#define CLR_SV_PRED_CSRS( ) csrrw x0, 0x4c8, 0
-#define SET_SV_MVL( val ) csrrwi x0, 0x4f2, val
-#define SET_SV_VL( val ) csrrwi x0, 0x4f0, val
+#define SET_SV_MVL( val ) csrrwi x0, 0x4f1, (val-1)
+#define SET_SV_VL( val ) csrrwi x0, 0x4f0, (val-1)
#define SV_LD_DATA( reg, from, offs ) \
la x1, from; \