16#include "../all_aligned_atomic_load_store.h"
18#include "../test_and_set_t_is_ao_t.h"
21#pragma mc_func AO_sync { "7c0004ac" }
24# define AO_lwsync AO_sync
27#pragma mc_func AO_lwsync { "7c2004ac" }
30#define AO_nop_write() AO_lwsync()
31#define AO_HAVE_nop_write
33#define AO_nop_read() AO_lwsync()
34#define AO_HAVE_nop_read
45#define AO_HAVE_load_acquire
53#define AO_HAVE_store_release
55#ifndef AO_PREFER_GENERALIZED
61#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
64 unsigned long temp = 1;
74 :
"r"(addr),
"r"(temp)
88 :
"r"(addr),
"r"(temp)
93#define AO_HAVE_test_and_set
101#define AO_HAVE_test_and_set_acquire
108#define AO_HAVE_test_and_set_release
118#define AO_HAVE_test_and_set_full
125# if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
126 __asm__ __volatile__(
134 :
"r"(addr),
"r"(new_val),
"r"(old_val)
137 __asm__ __volatile__(
145 :
"r"(addr),
"r"(new_val),
"r"(old_val)
150#define AO_HAVE_fetch_compare_and_swap
160#define AO_HAVE_fetch_compare_and_swap_acquire
169#define AO_HAVE_fetch_compare_and_swap_release
181#define AO_HAVE_fetch_compare_and_swap_full
#define AO_fetch_compare_and_swap_full(addr, old, newval)
AO_INLINE AO_TS_VAL_t AO_test_and_set_acquire(volatile AO_TS_t *addr)
AO_INLINE AO_t AO_fetch_compare_and_swap_release(volatile AO_t *addr, AO_t old_val, AO_t new_val)
AO_INLINE AO_t AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val)
AO_INLINE void AO_store_release(volatile AO_t *addr, AO_t value)
AO_INLINE AO_TS_VAL_t AO_test_and_set(volatile AO_TS_t *addr)
AO_INLINE AO_TS_VAL_t AO_test_and_set_full(volatile AO_TS_t *addr)
AO_INLINE AO_TS_VAL_t AO_test_and_set_release(volatile AO_TS_t *addr)
AO_INLINE AO_t AO_fetch_compare_and_swap_acquire(volatile AO_t *addr, AO_t old_val, AO_t new_val)
AO_INLINE AO_t AO_load_acquire(const volatile AO_t *addr)