diff options
author | Chih-Min Chao <chihmin.chao@sifive.com> | 2020-03-23 20:27:28 -0700 |
---|---|---|
committer | Chih-Min Chao <chihmin.chao@sifive.com> | 2020-03-23 20:58:29 -0700 |
commit | 6cc52d6029e4236ba3b0d5c8e4a842f4a53b469b (patch) | |
tree | d9cf740c68c90049fd0eb1c2fa1fa60233eeeea2 /riscv/decode.h | |
parent | 448b91d9779abc7c16ccb549e0d9549f5a8bd1fa (diff) | |
download | spike-6cc52d6029e4236ba3b0d5c8e4a842f4a53b469b.zip spike-6cc52d6029e4236ba3b0d5c8e4a842f4a53b469b.tar.gz spike-6cc52d6029e4236ba3b0d5c8e4a842f4a53b469b.tar.bz2 |
rvv: restrict segment load register rule
For unit-strided and stride segment load, mask register can't
overlap destination register if masked
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Diffstat (limited to 'riscv/decode.h')
-rw-r--r-- | riscv/decode.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/riscv/decode.h b/riscv/decode.h index 8c8e7e6..9b66e25 100644 --- a/riscv/decode.h +++ b/riscv/decode.h @@ -457,9 +457,8 @@ static inline bool is_overlapped(const int astart, const int asize, #define VI_CHECK_SXX \ VI_CHECK_STORE_SXX; \ - if (P.VU.vlmul > 1 && insn.v_vm() == 0) { \ + if (insn.v_vm() == 0 && (insn.v_nf() > 0 || P.VU.vlmul > 1)) \ require(insn.rd() != 0); \ - } #define VI_CHECK_DSS(is_vs1) \ VI_WIDE_CHECK_COMMON; \ @@ -806,7 +805,6 @@ static inline bool is_overlapped(const int astart, const int asize, // merge and copy loop #define VI_VVXI_MERGE_LOOP(BODY) \ - VI_CHECK_SXX; \ VI_GENERAL_LOOP_BASE \ if (sew == e8){ \ VXI_PARAMS(e8); \ |