]> git.ipfire.org Git - thirdparty/qemu.git/commit
tcg/s390x: fix constraint for 32-bit TSTEQ/TSTNE
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Oct 2024 09:09:52 +0000 (11:09 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 18 Oct 2024 14:42:11 +0000 (17:42 +0300)
commit994f8717ee063ec6101c5d49714e3fab2bb2f27c
treef27d9d84fb10760986956a72045630e70f3171ac
parent0ff5ab6f57a2427a3e83969b2e7dd71e04caae39
tcg/s390x: fix constraint for 32-bit TSTEQ/TSTNE

32-bit TSTEQ and TSTNE is subject to the same constraints as
for 64-bit, but setcond_i32 and negsetcond_i32 were incorrectly
using TCG_CT_CONST ("i") instead of TCG_CT_CONST_CMP ("C").

Adjust the constraint and make tcg_target_const_match use the
same sequence as tgen_cmp2: first check if the constant is a
valid operand for TSTEQ/TSTNE, then accept everything for 32-bit
non-test comparisons, finally check if the constant is a valid
operand for 64-bit non-test comparisons.

Reported-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 615586cb356811e46c2e5f85c36db4b93f8381cd)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
tcg/s390x/tcg-target.c.inc