]> git.ipfire.org Git - thirdparty/qemu.git/commit
tcg: Use HAVE_CMPXCHG128 instead of CONFIG_CMPXCHG128
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 13 Jul 2023 20:06:15 +0000 (20:06 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Sat, 15 Jul 2023 07:02:49 +0000 (08:02 +0100)
commit76f9d6ad19494290eb2f00d33c6a582ce3447991
treeb3f4e2eec70bd0bdad13ed90951a60ade4155c88
parentdeba78709ae8ce103e2248413857747f804cd1ef
tcg: Use HAVE_CMPXCHG128 instead of CONFIG_CMPXCHG128

We adjust CONFIG_ATOMIC128 and CONFIG_CMPXCHG128 with
CONFIG_ATOMIC128_OPT in atomic128.h.  It is difficult
to tell when those changes have been applied with the
ifdef we must use with CONFIG_CMPXCHG128.  So instead
use HAVE_CMPXCHG128, which triggers -Werror-undef when
the proper header has not been included.

Improves tcg_gen_atomic_cmpxchg_i128 for s390x host, which
requires CONFIG_ATOMIC128_OPT.  Without this we fall back
to EXCP_ATOMIC to single-step 128-bit atomics, which is
slow enough to cause some tests to time out.

Reported-by: Thomas Huth <thuth@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/atomic_common.c.inc
accel/tcg/cputlb.c
accel/tcg/tcg-runtime.h
accel/tcg/user-exec.c
include/exec/helper-proto-common.h
tcg/tcg-op-ldst.c