aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--riscv/insns/vmv_s_x.h4
-rw-r--r--riscv/insns/vmv_x_s.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/riscv/insns/vmv_s_x.h b/riscv/insns/vmv_s_x.h
index 948b5be..99db2a0 100644
--- a/riscv/insns/vmv_s_x.h
+++ b/riscv/insns/vmv_s_x.h
@@ -5,7 +5,7 @@ require(P.VU.vsew == e8 || P.VU.vsew == e16 ||
P.VU.vsew == e32 || P.VU.vsew == e64);
reg_t vl = P.VU.vl;
-if (vl > 0) {
+if (vl > 0 && P.VU.vstart < vl) {
reg_t rd_num = insn.rd();
reg_t sew = P.VU.vsew;
@@ -26,3 +26,5 @@ if (vl > 0) {
vl = 0;
}
+
+P.VU.vstart = 0;
diff --git a/riscv/insns/vmv_x_s.h b/riscv/insns/vmv_x_s.h
index 50f2e79..086812b 100644
--- a/riscv/insns/vmv_x_s.h
+++ b/riscv/insns/vmv_x_s.h
@@ -26,3 +26,5 @@ if (!(rs1 >= 0 && rs1 < (P.VU.get_vlen() / sew))) {
break;
}
}
+
+P.VU.vstart = 0;