Use GCC atomic primitives for aarch64-ilp32 double-wide operations
authorIvan Maidanski <ivmai@mail.ru>
Fri, 26 Oct 2018 18:33:46 +0000 (21:33 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 29 Oct 2018 05:12:51 +0000 (08:12 +0300)
commit3f2349b8b3606d1083767cd70f01e4eccaed6e81
treeab9911682082387261b4019c53c6f60fd656218d
parent3f41ecbcaf2d0b79ce0664fd454a5c7cc0a03343
Use GCC atomic primitives for aarch64-ilp32 double-wide operations

Issue #38 (libatomic_ops).

Both gcc and clang have correct support of 64-bit atomic primitives
on AArch64, so need to use inline assembly.

* src/atomic_ops/sysdeps/gcc/aarch64.h [!__clang__] (AO_double_load,
AO_double_load_acquire, AO_double_store, AO_double_store_release,
AO_double_compare_and_swap, AO_double_compare_and_swap_acquire,
AO_double_compare_and_swap_release, AO_double_compare_and_swap_full):
Do not define if __ILP32__ (unless AO_AARCH64_ASM_LOAD_STORE_CAS).
* src/atomic_ops/sysdeps/gcc/aarch64.h [!__clang__
|| AO_CLANG_PREREQ(3,9)] (AO_GCC_HAVE_double_SYNC_CAS): Do not define
if __ILP32__; update gcc version in comment.
src/atomic_ops/sysdeps/gcc/aarch64.h