Browse Source

Merge pull request #2146 from riscv-software-src/2144-redux

fix VI_EXT_CHECK vl=0 behavior
pull/1936/head
Andrew Waterman 5 months ago
committed by GitHub
parent
commit
00db4e129f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      riscv/v_ext_macros.h

3
riscv/v_ext_macros.h

@ -1405,7 +1405,6 @@ VI_VX_ULOOP({ \
#define VI_EXT_CHECK(div) \
require(insn.rd() != insn.rs2()); \
require_vm; \
VI_LOOP_BASE \
reg_t from = P.VU.vsew / div; \
require(from >= e8 && from <= e64); \
require(((float)P.VU.vflmul / div) >= 0.125 && ((float)P.VU.vflmul / div) <= 8 ); \
@ -1420,6 +1419,7 @@ VI_VX_ULOOP({ \
// vector: sign/unsiged extension
#define VI_VV_EXT(div, type) \
VI_EXT_CHECK(div); \
VI_LOOP_BASE \
reg_t pat = (((P.VU.vsew >> 3) << 4) | from >> 3); \
switch (pat) { \
case 0x21: \
@ -1467,6 +1467,7 @@ VI_VX_ULOOP({ \
#define VI_VF_EXT(div, BODY) \
require(div == 2 && P.VU.vsew == 8); \
VI_EXT_CHECK(div); \
VI_LOOP_BASE \
BODY; \
VI_LOOP_END

Loading…
Cancel
Save