diff options
-rw-r--r-- | riscv/insns/vfmv_f_s.h | 2 | ||||
-rw-r--r-- | riscv/insns/vfmv_s_f.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/riscv/insns/vfmv_f_s.h b/riscv/insns/vfmv_f_s.h index dbfe8f9..586b80e 100644 --- a/riscv/insns/vfmv_f_s.h +++ b/riscv/insns/vfmv_f_s.h @@ -26,3 +26,5 @@ if (FLEN == 64) { } else { WRITE_FRD(f32(vs2_0)); } + +P.VU.vstart = 0; diff --git a/riscv/insns/vfmv_s_f.h b/riscv/insns/vfmv_s_f.h index 1f319b5..84c5a3f 100644 --- a/riscv/insns/vfmv_s_f.h +++ b/riscv/insns/vfmv_s_f.h @@ -5,7 +5,7 @@ require_extension('F'); require(P.VU.vsew >= e32 && P.VU.vsew <= 64); reg_t vl = P.VU.vl; -if (vl > 0) { +if (vl > 0 && P.VU.vstart < vl) { reg_t rd_num = insn.rd(); switch(P.VU.vsew) { |