From: Ivan Maidanski Date: Wed, 6 Dec 2017 08:05:38 +0000 (+0300) Subject: Define double-word CAS for all clang/aarch64 versions X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=baa9851fcb2552abe0d8eb69324af273f4edba4f;p=libatomic_ops Define double-word CAS for all clang/aarch64 versions (fix commit 46d43dc) * src/atomic_ops/sysdeps/gcc/aarch64.h [__clang__] (AO_GCC_HAVE_double_SYNC_CAS): Define for all Clang versions. --- diff --git a/src/atomic_ops/sysdeps/gcc/aarch64.h b/src/atomic_ops/sysdeps/gcc/aarch64.h index 010fcdd..90e9e06 100644 --- a/src/atomic_ops/sysdeps/gcc/aarch64.h +++ b/src/atomic_ops/sysdeps/gcc/aarch64.h @@ -211,10 +211,15 @@ #endif /* !AO_PREFER_BUILTIN_ATOMICS && !__clang__ */ +/* As of clang-5.0, __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 */ +/* macro is still missing (while the double-word CAS is available). */ +#if defined(__clang__) +# define AO_GCC_HAVE_double_SYNC_CAS +#endif + #if (defined(__clang__) && !AO_CLANG_PREREQ(3, 8)) || defined(__APPLE_CC__) /* __GCC_HAVE_SYNC_COMPARE_AND_SWAP_n macros are missing. */ # define AO_GCC_FORCE_HAVE_CAS -# define AO_GCC_HAVE_double_SYNC_CAS #endif #include "generic.h"