24#include "../all_aligned_atomic_load_store.h"
32#include "../ordered_except_wr.h"
34#ifndef AO_ASSUME_WINDOWS98
36# define AO_ASSUME_WINDOWS98
38#ifndef AO_USE_INTERLOCKED_INTRINSICS
39# define AO_USE_INTERLOCKED_INTRINSICS
43#ifdef AO_ASM_X64_AVAILABLE
53 lock xadd
byte ptr [rbx], al
56# define AO_HAVE_char_fetch_and_add_full
65 lock xadd word ptr [rbx], ax
68# define AO_HAVE_short_fetch_and_add_full
80# define AO_HAVE_nop_full
82# ifndef AO_HAVE_test_and_set_full
83# include "../test_and_set_t_is_char.h"
92 xchg
byte ptr [rbx],al ;
95# define AO_HAVE_test_and_set_full
100#ifndef AO_HAVE_test_and_set_full
101# include "../test_and_set_t_is_ao_t.h"
105#ifdef AO_CMPXCHG16B_AVAILABLE
108# include "../standard_ao_double_t.h"
109# pragma intrinsic (_InterlockedCompareExchange128)
116 __int64 comparandResult[2];
119 comparandResult[0] = old_val1;
120 comparandResult[1] = old_val2;
121 return _InterlockedCompareExchange128((
volatile __int64 *)addr,
126# define AO_HAVE_compare_double_and_swap_double_full
128# elif defined(AO_ASM_X64_AVAILABLE)
129# include "../standard_ao_double_t.h"
140 mov rdx,QWORD PTR [old_val2] ;
141 mov rax,QWORD PTR [old_val1] ;
142 mov rcx,QWORD PTR [new_val2] ;
143 mov rbx,QWORD PTR [new_val1] ;
144 lock cmpxchg16b [addr] ;
148# define AO_HAVE_compare_double_and_swap_double_full
AO_INLINE void AO_nop_full(void)
#define AO_ASSERT_ADDR_ALIGNED(addr)
AO_INLINE AO_TS_VAL_t AO_test_and_set_full(volatile AO_TS_t *addr)
#define AO_compare_double_and_swap_double_full(addr, old1, old2, newval1, newval2)
AO_INLINE unsigned char AO_char_fetch_and_add_full(volatile unsignedchar *addr, unsignedchar incr)
AO_INLINE unsigned short AO_short_fetch_and_add_full(volatile unsignedshort *addr, unsignedshort incr)