aboutsummaryrefslogtreecommitdiff
path: root/riscv/decode.h
diff options
context:
space:
mode:
authorChih-Min Chao <chihmin.chao@sifive.com>2019-09-25 02:06:08 -0700
committerChih-Min Chao <chihmin.chao@sifive.com>2019-11-11 19:02:34 -0800
commitdf85f7fbe4b82eccf594a0d0fb7b8f5e6150dea1 (patch)
tree37ba21d66bc7b0b5bb8bdf257171b263322e4afe /riscv/decode.h
parent3fc52f5989e498aeaad147b5b5591d63e27ca9a9 (diff)
downloadspike-df85f7fbe4b82eccf594a0d0fb7b8f5e6150dea1.zip
spike-df85f7fbe4b82eccf594a0d0fb7b8f5e6150dea1.tar.gz
spike-df85f7fbe4b82eccf594a0d0fb7b8f5e6150dea1.tar.bz2
rvv: fix redsum/vmv for non-tail-zero case
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Diffstat (limited to 'riscv/decode.h')
-rw-r--r--riscv/decode.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/riscv/decode.h b/riscv/decode.h
index 39eb3ba..0feb7ab 100644
--- a/riscv/decode.h
+++ b/riscv/decode.h
@@ -477,9 +477,11 @@ static inline bool is_overlaped(const int astart, const int asize,
#define VI_LOOP_REDUCTION_END(x) \
} \
- if (vl > 0 && TAIL_ZEROING) { \
+ if (vl > 0) { \
vd_0_des = vd_0_res; \
- TAIL_ZERO_REDUCTION(x); \
+ if (TAIL_ZEROING) { \
+ TAIL_ZERO_REDUCTION(x); \
+ } \
} \
P.VU.vstart = 0;
@@ -1583,10 +1585,10 @@ for (reg_t i = 0; i < vlmax; ++i) { \
} \
P.VU.vstart = 0; \
set_fp_exceptions; \
- if (vl > 0 && TAIL_ZEROING) { \
+ if (vl > 0) { \
P.VU.elt<type_sew_t<x>::type>(rd_num, 0) = vd_0.v; \
- for (reg_t i = 1; i < (P.VU.VLEN / x); ++i) { \
- P.VU.elt<type_sew_t<x>::type>(rd_num, i) = 0; \
+ if (TAIL_ZEROING) { \
+ TAIL_ZERO_REDUCTION(x); \
} \
}