aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYueh-Ting (eop) Chen <yueh.ting.chen@gmail.com>2021-12-10 05:51:42 +0800
committerGitHub <noreply@github.com>2021-12-09 13:51:42 -0800
commit65ef13629af926cb3ed068b3720351aaee10b225 (patch)
tree024d8c28e4c21ca7ab7b0a7d9fa072d41b7c1d94
parenta68c7b12e6b9e9b9abd7ad1cee05c4a8432719ec (diff)
downloadspike-65ef13629af926cb3ed068b3720351aaee10b225.zip
spike-65ef13629af926cb3ed068b3720351aaee10b225.tar.gz
spike-65ef13629af926cb3ed068b3720351aaee10b225.tar.bz2
Simplfy vfmv_v_f (#884)
-rw-r--r--riscv/insns/vfmv_v_f.h33
1 files changed, 3 insertions, 30 deletions
diff --git a/riscv/insns/vfmv_v_f.h b/riscv/insns/vfmv_v_f.h
index 9f66004..50b7513 100644
--- a/riscv/insns/vfmv_v_f.h
+++ b/riscv/insns/vfmv_v_f.h
@@ -1,31 +1,4 @@
// vfmv_vf vd, vs1
-require_align(insn.rd(), P.VU.vflmul);
-VI_VFP_COMMON
-switch(P.VU.vsew) {
- case e16:
- for (reg_t i=P.VU.vstart->read(); i<vl; ++i) {
- auto &vd = P.VU.elt<float16_t>(rd_num, i, true);
- auto rs1 = f16(READ_FREG(rs1_num));
-
- vd = rs1;
- }
- break;
- case e32:
- for (reg_t i=P.VU.vstart->read(); i<vl; ++i) {
- auto &vd = P.VU.elt<float32_t>(rd_num, i, true);
- auto rs1 = f32(READ_FREG(rs1_num));
-
- vd = rs1;
- }
- break;
- case e64:
- for (reg_t i=P.VU.vstart->read(); i<vl; ++i) {
- auto &vd = P.VU.elt<float64_t>(rd_num, i, true);
- auto rs1 = f64(READ_FREG(rs1_num));
-
- vd = rs1;
- }
- break;
-}
-
-P.VU.vstart->write(0);
+VI_VF_MERGE_LOOP({
+ vd = rs1;
+})