On 10/28/26 09:33, Philippe Mathieu-Daudé wrote:
The .vi emitters for add, reverse sub and saturating ops pass the
whole replicated constant (e.g. 0x0505050505050505) to encode_vi()
instead of a single element. This aborts debug builds on common
vectorized guest code and is undefined behaviour in release builds.

Add vec_imm() to extract the VECE element, and use it.

Fixes: 006352d69f14 ("tcg/riscv64: Assert immediate in range ...")
Signed-off-by: Philippe Mathieu-Daudé<[email protected]>
---
  tcg/riscv64/tcg-target.c.inc | 23 +++++++++++++++++------
  1 file changed, 17 insertions(+), 6 deletions(-)

Reviewed-by: Richard Henderson <[email protected]>

r~

Reply via email to