From 755ad71bb7cd59f735010c7b8ec7f514eea96e31 Mon Sep 17 00:00:00 2001 From: Chih-Min Chao Date: Tue, 25 Nov 2025 21:34:08 -0800 Subject: [PATCH] zvfofp4min: fix shared contraint with v[zs]ext Signed-off-by: Chih-Min Chao --- riscv/v_ext_macros.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/riscv/v_ext_macros.h b/riscv/v_ext_macros.h index 1bc088f12d..d6dfe7f130 100644 --- a/riscv/v_ext_macros.h +++ b/riscv/v_ext_macros.h @@ -1405,8 +1405,6 @@ VI_VX_ULOOP({ \ #define VI_EXT_CHECK(div) \ require(insn.rd() != insn.rs2()); \ require_vm; \ - 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 ); \ require_align(insn.rd(), P.VU.vflmul); \ require_align(insn.rs2(), P.VU.vflmul / div); \ @@ -1418,6 +1416,8 @@ VI_VX_ULOOP({ \ // vector: sign/unsiged extension #define VI_VV_EXT(div, type) \ + reg_t from = P.VU.vsew / div; \ + require(from >= e8 && from <= e64); \ VI_EXT_CHECK(div); \ VI_LOOP_BASE \ reg_t pat = (((P.VU.vsew >> 3) << 4) | from >> 3); \