Skip to content

Commit be29169

Browse files
committed
vector: constrain index load/store for eew64 and xlen32
Section 18.3 says "The V extension supports all vector load and store instructions (Section Vector Loads and Stores), except the V extension does not support EEW=64 for index values when XLEN=32" Signed-off-by: Chih-Min Chao <[email protected]>
1 parent 217cbc5 commit be29169

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

riscv/v_ext_macros.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ static inline bool is_overlapped_widen(const int astart, int asize,
9090
#define VI_CHECK_ST_INDEX(elt_width) \
9191
require_vector(false); \
9292
require(elt_width <= P.VU.ELEN); \
93+
require(elt_width <= P.get_xlen()); \
9394
float vemul = ((float)elt_width / P.VU.vsew * P.VU.vflmul); \
9495
require(vemul >= 0.125 && vemul <= 8); \
9596
reg_t UNUSED emul = vemul < 1 ? 1 : vemul; \

0 commit comments

Comments
 (0)