aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg-op-ldst.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-07-13 20:06:15 +0000
committerRichard Henderson <richard.henderson@linaro.org>2023-07-15 08:02:49 +0100
commit76f9d6ad19494290eb2f00d33c6a582ce3447991 (patch)
treeb3f4e2eec70bd0bdad13ed90951a60ade4155c88 /tcg/tcg-op-ldst.c
parentdeba78709ae8ce103e2248413857747f804cd1ef (diff)
downloadqemu-76f9d6ad19494290eb2f00d33c6a582ce3447991.zip
qemu-76f9d6ad19494290eb2f00d33c6a582ce3447991.tar.gz
qemu-76f9d6ad19494290eb2f00d33c6a582ce3447991.tar.bz2
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>
Diffstat (limited to 'tcg/tcg-op-ldst.c')
-rw-r--r--tcg/tcg-op-ldst.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcg/tcg-op-ldst.c b/tcg/tcg-op-ldst.c
index 0fcc161..d54c305 100644
--- a/tcg/tcg-op-ldst.c
+++ b/tcg/tcg-op-ldst.c
@@ -778,7 +778,7 @@ typedef void (*gen_atomic_op_i64)(TCGv_i64, TCGv_env, TCGv_i64,
#else
# define WITH_ATOMIC64(X)
#endif
-#ifdef CONFIG_CMPXCHG128
+#if HAVE_CMPXCHG128
# define WITH_ATOMIC128(X) X,
#else
# define WITH_ATOMIC128(X)