diff --git a/riscv/v_ext_macros.h b/riscv/v_ext_macros.h index f2b32005..1bc088f1 100644 --- a/riscv/v_ext_macros.h +++ b/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