summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2020-04-07 09:54:49 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-09-09 08:33:04 +0300
commit48168a6d455c2fd2f6f19c8f1ae3b1ed4dbfcbbc (patch)
tree7c906140db07524c53d78e23bfe7f0b5db41cbed
parent64ec5569a830087b96c6d04482da62153907e9e4 (diff)
downloadlibatomic_ops-48168a6d455c2fd2f6f19c8f1ae3b1ed4dbfcbbc.tar.gz
Use GCC atomic intrinsics for s390x (clang 8.0+)
* src/atomic_ops/sysdeps/gcc/s390.h [AO_CLANG_PREREQ(8,0) && __s390x__ && !AO_DISABLE_GCC_ATOMICS]: Include generic.h. * src/atomic_ops/sysdeps/gcc/s390.h [!(AO_CLANG_PREREQ(8,0) && __s390x__ && !AO_DISABLE_GCC_ATOMICS)]: Do not include ordered_except_wr.h, all_aligned_atomic_load_store.h, test_and_set_t_is_ao_t.h. * src/atomic_ops/sysdeps/gcc/s390.h [!(AO_CLANG_PREREQ(8,0) && __s390x__ && !AO_DISABLE_GCC_ATOMICS)] (AO_compare_and_swap_full, AO_fetch_compare_and_swap_full): Do not define.
-rw-r--r--src/atomic_ops/sysdeps/gcc/s390.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/atomic_ops/sysdeps/gcc/s390.h b/src/atomic_ops/sysdeps/gcc/s390.h
index aece4d2..9b31da8 100644
--- a/src/atomic_ops/sysdeps/gcc/s390.h
+++ b/src/atomic_ops/sysdeps/gcc/s390.h
@@ -15,10 +15,10 @@
*
*/
-#if AO_GNUC_PREREQ(5, 4) && defined(__s390x__) \
+#if (AO_GNUC_PREREQ(5, 4) || AO_CLANG_PREREQ(8, 0)) && defined(__s390x__) \
&& !defined(AO_DISABLE_GCC_ATOMICS)
- /* Probably, it could be enabled for earlier gcc versions. */
- /* TODO: As of clang-3.8.0, an error occurs in backend for AtomicFence. */
+ /* Probably, it could be enabled for earlier clang/gcc versions. */
+ /* But, e.g., clang-3.8.0 produces a backend error for AtomicFence. */
# include "generic.h"