diff options
author | Yueh-Ting (eop) Chen <yueh.ting.chen@gmail.com> | 2021-12-22 15:21:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-21 23:21:12 -0800 |
commit | 8219bf0baa428af32cc59fa3ae21909328f53fd5 (patch) | |
tree | 8bccd3875c139cbf5ea419bad5c261a0ba8893d0 | |
parent | f1ca8de7217e6c3bcfc8e93db54258bd117b2151 (diff) | |
download | spike-8219bf0baa428af32cc59fa3ae21909328f53fd5.zip spike-8219bf0baa428af32cc59fa3ae21909328f53fd5.tar.gz spike-8219bf0baa428af32cc59fa3ae21909328f53fd5.tar.bz2 |
Add missing check for floating-point merge instructions (#893)
-rw-r--r-- | riscv/decode.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/riscv/decode.h b/riscv/decode.h index 02d0569..c0f362a 100644 --- a/riscv/decode.h +++ b/riscv/decode.h @@ -1043,14 +1043,16 @@ static inline bool is_aligned(const unsigned val, const unsigned pos) #define VI_VF_MERGE_LOOP(BODY) \ VI_CHECK_SSS(false); \ - VI_MERGE_LOOP_BASE \ - if(sew == e16){ \ + VI_VFP_COMMON \ + for (reg_t i=P.VU.vstart->read(); i<vl; ++i){ \ + VI_MERGE_VARS \ + if(P.VU.vsew == e16){ \ VFP_VF_PARAMS(16); \ BODY; \ - }else if(sew == e32){ \ + }else if(P.VU.vsew == e32){ \ VFP_VF_PARAMS(32); \ BODY; \ - }else if(sew == e64){ \ + }else if(P.VU.vsew == e64){ \ VFP_VF_PARAMS(64); \ BODY; \ } \ |