]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/loongarch: Use actual operand size with vbsrl check
authorBibo Mao <maobibo@loongson.cn>
Thu, 12 Dec 2024 08:22:34 +0000 (16:22 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 28 Dec 2024 22:50:59 +0000 (01:50 +0300)
Hardcoded 32 bytes is used for vbsrl emulation check, there is
problem when options lsx=on,lasx=off is used for vbsrl.v instruction
in TCG mode. It injects LASX exception rather LSX exception.

Here actual operand size is used.

Cc: qemu-stable@nongnu.org
Fixes: df97f338076 ("target/loongarch: Implement xvreplve xvinsve0 xvpickve")
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit d41989e7548397b469ec9c7be4cee699321a317e)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/loongarch/tcg/insn_trans/trans_vec.c.inc

index 92b1d22e28934b524a1f6ae6cb2bcbb189de27e3..ba5ca98a33c89871451d824998997b3c958fe5e5 100644 (file)
@@ -5126,7 +5126,7 @@ static bool do_vbsrl_v(DisasContext *ctx, arg_vv_i *a, uint32_t oprsz)
 {
     int i, ofs;
 
-    if (!check_vec(ctx, 32)) {
+    if (!check_vec(ctx, oprsz)) {
         return true;
     }