aboutsummaryrefslogtreecommitdiff
path: root/riscv/decode.h
diff options
context:
space:
mode:
authorChih-Min Chao <chihmin.chao@sifive.com>2020-05-25 23:37:31 -0700
committerChih-Min Chao <chihmin.chao@sifive.com>2020-05-25 23:53:38 -0700
commit06911620765f62c840fdff1e64e289df0ac51b3c (patch)
tree8c2ab434f9ab378574b964630bbe8bc90016694b /riscv/decode.h
parent9fb13bd8de86189ef1f6e2359215d8dd86a0d3cf (diff)
downloadspike-06911620765f62c840fdff1e64e289df0ac51b3c.zip
spike-06911620765f62c840fdff1e64e289df0ac51b3c.tar.gz
spike-06911620765f62c840fdff1e64e289df0ac51b3c.tar.bz2
rvv: add e8 type for scale
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Diffstat (limited to 'riscv/decode.h')
-rw-r--r--riscv/decode.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/riscv/decode.h b/riscv/decode.h
index e6e3cb7..c1fed9b 100644
--- a/riscv/decode.h
+++ b/riscv/decode.h
@@ -2185,6 +2185,20 @@ for (reg_t i = 0; i < P.VU.vlmax && P.VU.vl != 0; ++i) { \
DEBUG_RVV_FP_VV; \
VI_VFP_LOOP_END
+#define VI_VFP_LOOP_SCALE_BASE \
+ require_fp; \
+ require_vector;\
+ require((P.VU.vsew == e8 && p->supports_extension(EXT_ZFH)) || \
+ (P.VU.vsew == e16 && p->supports_extension('F')) || \
+ (P.VU.vsew == e32 && p->supports_extension('D'))); \
+ reg_t vl = P.VU.vl; \
+ reg_t rd_num = insn.rd(); \
+ reg_t rs1_num = insn.rs1(); \
+ reg_t rs2_num = insn.rs2(); \
+ softfloat_roundingMode = STATE.frm; \
+ for (reg_t i=P.VU.vstart; i<vl; ++i){ \
+ VI_LOOP_ELEMENT_SKIP();
+
#define VI_VFP_CVT_SCALE(BODY8, BODY16, BODY32, is_widen) \
if (is_widen) { \
VI_CHECK_DSS(false);\
@@ -2193,21 +2207,21 @@ for (reg_t i = 0; i < P.VU.vlmax && P.VU.vl != 0; ++i) { \
} \
switch(P.VU.vsew) { \
case e8: {\
- VI_VFP_LOOP_BASE \
+ VI_VFP_LOOP_SCALE_BASE \
BODY8 \
set_fp_exceptions; \
VI_VFP_LOOP_END \
} \
break; \
case e16: {\
- VI_VFP_LOOP_BASE \
+ VI_VFP_LOOP_SCALE_BASE \
BODY16 \
set_fp_exceptions; \
VI_VFP_LOOP_END \
} \
break; \
case e32: {\
- VI_VFP_LOOP_BASE \
+ VI_VFP_LOOP_SCALE_BASE \
BODY32 \
set_fp_exceptions; \
VI_VFP_LOOP_END \