diff options
author | Bibo Mao <maobibo@loongson.cn> | 2024-12-12 16:22:34 +0800 |
---|---|---|
committer | Bibo Mao <maobibo@loongson.cn> | 2024-12-27 11:32:33 +0800 |
commit | d41989e7548397b469ec9c7be4cee699321a317e (patch) | |
tree | 2c4b058d06f324eb1c6411475f4ee71b37a3aeea | |
parent | 02ce6cea71be4f6774351f5e658d50044c5b53b2 (diff) | |
download | qemu-d41989e7548397b469ec9c7be4cee699321a317e.zip qemu-d41989e7548397b469ec9c7be4cee699321a317e.tar.gz qemu-d41989e7548397b469ec9c7be4cee699321a317e.tar.bz2 |
target/loongarch: Use actual operand size with vbsrl check
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>
-rw-r--r-- | target/loongarch/tcg/insn_trans/trans_vec.c.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/loongarch/tcg/insn_trans/trans_vec.c.inc b/target/loongarch/tcg/insn_trans/trans_vec.c.inc index d317dfc..dff9277 100644 --- a/target/loongarch/tcg/insn_trans/trans_vec.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_vec.c.inc @@ -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; } |