]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/s390x: Fix LAALG not updating cc_src
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 6 Nov 2023 09:31:24 +0000 (10:31 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 19 Nov 2023 18:15:06 +0000 (21:15 +0300)
commita16eec9fb22444ef0aa2054d33fabbf8165ee78c
tree0b49ba03563795114f1014b33bd906d1e2d28269
parent255422dc75db9b3502434f791abfdc32e6d886bb
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>
(cherry picked from commit bea402482a8c94389638cbd3d7fe3963fb317f4c)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/s390x/tcg/insn-data.h.inc
target/s390x/tcg/translate.c