target/s390x: Fix LAALG not updating cc_src
commitbea402482a8c94389638cbd3d7fe3963fb317f4c
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 6 Nov 2023 09:31:24 +0000 (6 10:31 +0100)
committerThomas Huth <thuth@redhat.com>
Tue, 7 Nov 2023 18:27:08 +0000 (7 19:27 +0100)
tree3ea7045c81fe25e99e752798a762c7f3a94b6f27
parent43fecbe7a53fe8e5a6aff0d6471b1cc624e26b51
target/s390x: Fix LAALG not updating cc_src

LAALG uses op_laa() and wout_addu64(). The latter expects cc_src to be
set, but the former does not do it. This can lead to assertion failures
if something sets cc_src to neither 0 nor 1 before.

Fix by introducing op_laa_addu64(), which sets cc_src, and using it for
LAALG.

Fixes: 4dba4d6fef61 ("target/s390x: Use atomic operations for LOAD AND OP")
Cc: qemu-stable@nongnu.org
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20231106093605.1349201-4-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
target/s390x/tcg/insn-data.h.inc
target/s390x/tcg/translate.c