File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ const uint32_t EGS = 4;
66
77require_vsm4_constraints ;
88require_align (insn .rd (), P .VU .vflmul );
9+ require_vs2_align_eglmul (128 );
910// No overlap of vd and vs2.
1011require_noover_eglmul (insn .rd (), insn .rs2 ());
1112
Original file line number Diff line number Diff line change 8686// (LMUL * VLEN) <= EGW
8787#define require_egw_fits (EGW ) require((EGW) <= (P.VU.VLEN * P.VU.vflmul))
8888
89+ // Ensures that a register index is aligned to EMUL
90+ // evaluated as EGW / VLEN.
91+ // The check is only enabled if this value is greater
92+ // than one (no index alignment check required for fractional EMUL)
93+ #define require_vreg_align_eglmul (EGW, VREG_NUM ) \
94+ do { \
95+ float vfeglmul = EGW / P.VU .VLEN ; \
96+ if (vfeglmul > 1 ) { \
97+ require_align (VREG_NUM, vfeglmul); \
98+ }\
99+ } while (0 )
100+
101+ #define require_vs2_align_eglmul (EGW ) require_vreg_align_eglmul(EGW, insn.rs2())
102+
89103// ensure that rs2 and rd do not overlap, assuming rd encodes an LMUL wide
90104// vector register group and rs2 encodes an vs2_EMUL=ceil(EGW / VLEN) vector register
91105// group.
Original file line number Diff line number Diff line change 1010// vaes*.vs instruction constraints:
1111// - Zvkned is enabled
1212// - EGW (128) <= LMUL * VLEN
13+ // - vd is LMUL aligned
14+ // - vs2 is ceil(EGW / VLEN) aligned
1315// - vd and vs2 cannot overlap
1416//
1517// The constraint that vstart and vl are both EGS (4) aligned
2224 require(P.VU.vsew == 32); \
2325 require_egw_fits(128); \
2426 require_align(insn.rd(), P.VU.vflmul); \
27+ require_vs2_align_eglmul(128); \
2528 require_noover_eglmul(insn.rd(), insn.rs2()); \
2629 } while (false)
2730
You can’t perform that action at this time.
0 commit comments