1*f183eaeeSriastradh/* $NetBSD: atomic.S,v 1.37 2024/07/16 22:44:38 riastradh Exp $ */ 265728ed4Sad 365728ed4Sad/*- 465728ed4Sad * Copyright (c) 2007 The NetBSD Foundation, Inc. 565728ed4Sad * All rights reserved. 665728ed4Sad * 765728ed4Sad * This code is derived from software contributed to The NetBSD Foundation 865728ed4Sad * by Jason R. Thorpe, and by Andrew Doran. 965728ed4Sad * 1065728ed4Sad * Redistribution and use in source and binary forms, with or without 1165728ed4Sad * modification, are permitted provided that the following conditions 1265728ed4Sad * are met: 1365728ed4Sad * 1. Redistributions of source code must retain the above copyright 1465728ed4Sad * notice, this list of conditions and the following disclaimer. 1565728ed4Sad * 2. Redistributions in binary form must reproduce the above copyright 1665728ed4Sad * notice, this list of conditions and the following disclaimer in the 1765728ed4Sad * documentation and/or other materials provided with the distribution. 1865728ed4Sad * 1965728ed4Sad * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2065728ed4Sad * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2165728ed4Sad * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2265728ed4Sad * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2365728ed4Sad * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2465728ed4Sad * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2565728ed4Sad * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2665728ed4Sad * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2765728ed4Sad * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2865728ed4Sad * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2965728ed4Sad * POSSIBILITY OF SUCH DAMAGE. 3065728ed4Sad */ 3165728ed4Sad 32654753c2Spooka#include <sys/param.h> 3365728ed4Sad#include <machine/asm.h> 3457561cf1Schristos/* 3557561cf1Schristos * __HAVE_ constants should not be in <machine/types.h> 3657561cf1Schristos * because we can't use them from assembly. OTOH we 3757561cf1Schristos * only need __HAVE_ATOMIC64_OPS here, and we don't. 3857561cf1Schristos */ 39043ef3bcSpooka#ifdef _KERNEL 40043ef3bcSpooka#define ALIAS(f, t) STRONG_ALIAS(f,t) 41043ef3bcSpooka#else 42043ef3bcSpooka#define ALIAS(f, t) WEAK_ALIAS(f,t) 43043ef3bcSpooka#endif 44043ef3bcSpooka 4558302d67Spooka#ifdef _HARDKERNEL 46efd0e73eSbouyer#include "opt_xen.h" 4788b0d179Smaxv#include <machine/frameasm.h> 48f012eec2Smaxv#define LOCK HOTPATCH(HP_NAME_NOLOCK, 1); lock 49712bef21Smaxv#define HOTPATCH_CAS_64 HOTPATCH(HP_NAME_CAS_64, 49); 5065728ed4Sad#else 51f012eec2Smaxv#define LOCK lock 52712bef21Smaxv#define HOTPATCH_CAS_64 /* nothing */ 5365728ed4Sad#endif 5465728ed4Sad 5565728ed4Sad .text 5665728ed4Sad 576740bb54SchsENTRY(_atomic_add_32) 5865728ed4Sad movl 4(%esp), %edx 5965728ed4Sad movl 8(%esp), %eax 60f012eec2Smaxv LOCK 6165728ed4Sad addl %eax, (%edx) 6265728ed4Sad ret 6319ef5b5bSuebayasiEND(_atomic_add_32) 6465728ed4Sad 656740bb54SchsENTRY(_atomic_add_32_nv) 6665728ed4Sad movl 4(%esp), %edx 6765728ed4Sad movl 8(%esp), %eax 6865728ed4Sad movl %eax, %ecx 69f012eec2Smaxv LOCK 7065728ed4Sad xaddl %eax, (%edx) 7165728ed4Sad addl %ecx, %eax 7265728ed4Sad ret 7319ef5b5bSuebayasiEND(_atomic_add_32_nv) 7465728ed4Sad 756740bb54SchsENTRY(_atomic_and_32) 7665728ed4Sad movl 4(%esp), %edx 7765728ed4Sad movl 8(%esp), %eax 78f012eec2Smaxv LOCK 7965728ed4Sad andl %eax, (%edx) 8065728ed4Sad ret 8119ef5b5bSuebayasiEND(_atomic_and_32) 8265728ed4Sad 836740bb54SchsENTRY(_atomic_and_32_nv) 8465728ed4Sad movl 4(%esp), %edx 8565728ed4Sad movl (%edx), %eax 8630fd42e8Sad0: 8765728ed4Sad movl %eax, %ecx 8865728ed4Sad andl 8(%esp), %ecx 89f012eec2Smaxv LOCK 9065728ed4Sad cmpxchgl %ecx, (%edx) 9130fd42e8Sad jnz 1f 9265728ed4Sad movl %ecx, %eax 9365728ed4Sad ret 9430fd42e8Sad1: 9530fd42e8Sad jmp 0b 9619ef5b5bSuebayasiEND(_atomic_and_32_nv) 9765728ed4Sad 986740bb54SchsENTRY(_atomic_dec_32) 9965728ed4Sad movl 4(%esp), %edx 100f012eec2Smaxv LOCK 10165728ed4Sad decl (%edx) 10265728ed4Sad ret 10319ef5b5bSuebayasiEND(_atomic_dec_32) 10465728ed4Sad 1056740bb54SchsENTRY(_atomic_dec_32_nv) 10665728ed4Sad movl 4(%esp), %edx 10765728ed4Sad movl $-1, %eax 108f012eec2Smaxv LOCK 10965728ed4Sad xaddl %eax, (%edx) 11065728ed4Sad decl %eax 11165728ed4Sad ret 11219ef5b5bSuebayasiEND(_atomic_dec_32_nv) 11365728ed4Sad 1146740bb54SchsENTRY(_atomic_inc_32) 11565728ed4Sad movl 4(%esp), %edx 116f012eec2Smaxv LOCK 11765728ed4Sad incl (%edx) 11865728ed4Sad ret 11919ef5b5bSuebayasiEND(_atomic_inc_32) 12065728ed4Sad 1216740bb54SchsENTRY(_atomic_inc_32_nv) 12265728ed4Sad movl 4(%esp), %edx 12365728ed4Sad movl $1, %eax 124f012eec2Smaxv LOCK 12565728ed4Sad xaddl %eax, (%edx) 12665728ed4Sad incl %eax 12765728ed4Sad ret 12819ef5b5bSuebayasiEND(_atomic_inc_32_nv) 12965728ed4Sad 1306740bb54SchsENTRY(_atomic_or_32) 13165728ed4Sad movl 4(%esp), %edx 13265728ed4Sad movl 8(%esp), %eax 133f012eec2Smaxv LOCK 13465728ed4Sad orl %eax, (%edx) 13565728ed4Sad ret 13619ef5b5bSuebayasiEND(_atomic_or_32) 13765728ed4Sad 1386740bb54SchsENTRY(_atomic_or_32_nv) 13965728ed4Sad movl 4(%esp), %edx 14065728ed4Sad movl (%edx), %eax 14130fd42e8Sad0: 14265728ed4Sad movl %eax, %ecx 14365728ed4Sad orl 8(%esp), %ecx 144f012eec2Smaxv LOCK 14565728ed4Sad cmpxchgl %ecx, (%edx) 14630fd42e8Sad jnz 1f 14765728ed4Sad movl %ecx, %eax 14865728ed4Sad ret 14930fd42e8Sad1: 15030fd42e8Sad jmp 0b 15119ef5b5bSuebayasiEND(_atomic_or_32_nv) 15265728ed4Sad 1536740bb54SchsENTRY(_atomic_swap_32) 15465728ed4Sad movl 4(%esp), %edx 15565728ed4Sad movl 8(%esp), %eax 15665728ed4Sad xchgl %eax, (%edx) 15765728ed4Sad ret 15819ef5b5bSuebayasiEND(_atomic_swap_32) 15965728ed4Sad 1606740bb54SchsENTRY(_atomic_cas_32) 16165728ed4Sad movl 4(%esp), %edx 16265728ed4Sad movl 8(%esp), %eax 16365728ed4Sad movl 12(%esp), %ecx 164f012eec2Smaxv LOCK 16565728ed4Sad cmpxchgl %ecx, (%edx) 16665728ed4Sad /* %eax now contains the old value */ 16765728ed4Sad ret 16819ef5b5bSuebayasiEND(_atomic_cas_32) 16965728ed4Sad 1706740bb54SchsENTRY(_atomic_cas_32_ni) 171cc655ebdSad movl 4(%esp), %edx 172cc655ebdSad movl 8(%esp), %eax 173cc655ebdSad movl 12(%esp), %ecx 174cc655ebdSad cmpxchgl %ecx, (%edx) 175cc655ebdSad /* %eax now contains the old value */ 176cc655ebdSad ret 17719ef5b5bSuebayasiEND(_atomic_cas_32_ni) 178cc655ebdSad 1794f8ce3b3SriastradhENTRY(_membar_acquire) 180e0c914a7Sriastradh /* 181e0c914a7Sriastradh * Every load from normal memory is a load-acquire on x86, so 182e0c914a7Sriastradh * there is never any need for explicit barriers to order 183e0c914a7Sriastradh * load-before-anything. 184e0c914a7Sriastradh */ 18565728ed4Sad ret 1864f8ce3b3SriastradhEND(_membar_acquire) 18765728ed4Sad 1884f8ce3b3SriastradhENTRY(_membar_release) 1893066bbbbSriastradh /* 1903066bbbbSriastradh * Every store to normal memory is a store-release on x86, so 1913066bbbbSriastradh * there is never any need for explicit barriers to order 1923066bbbbSriastradh * anything-before-store. 1933066bbbbSriastradh */ 19465728ed4Sad ret 1954f8ce3b3SriastradhEND(_membar_release) 19665728ed4Sad 1976740bb54SchsENTRY(_membar_sync) 198d767c973Sriastradh /* 199376bcb54Sriastradh * MFENCE, or a serializing instruction like a locked ADDL, 200d767c973Sriastradh * is necessary to order store-before-load. Every other 201d767c973Sriastradh * ordering -- load-before-anything, anything-before-store -- 202d767c973Sriastradh * is already guaranteed without explicit barriers. 203376bcb54Sriastradh * 204376bcb54Sriastradh * Empirically it turns out locked ADDL is cheaper than MFENCE, 205376bcb54Sriastradh * so we use that, with an offset below the return address on 206376bcb54Sriastradh * the stack to avoid a false dependency with RET. (It might 207376bcb54Sriastradh * even be better to use a much lower offset, say -128, to 208376bcb54Sriastradh * avoid false dependencies for subsequent callees of the 209376bcb54Sriastradh * caller.) 210376bcb54Sriastradh * 211376bcb54Sriastradh * https://pvk.ca/Blog/2014/10/19/performance-optimisation-~-writing-an-essay/ 212376bcb54Sriastradh * https://shipilev.net/blog/2014/on-the-fence-with-dependencies/ 213376bcb54Sriastradh * https://www.agner.org/optimize/instruction_tables.pdf 214*f183eaeeSriastradh * 215*f183eaeeSriastradh * Sync with xen_mb in sys/arch/i386/i386/cpufunc.S. 216d767c973Sriastradh */ 217f012eec2Smaxv LOCK 21865728ed4Sad addl $0, -4(%esp) 21965728ed4Sad ret 22019ef5b5bSuebayasiEND(_membar_sync) 22165728ed4Sad 22257561cf1Schristos#if defined(__HAVE_ATOMIC64_OPS) || defined(_KERNEL) 223c24c993fSbouyer#ifdef XENPV 224efd0e73eSbouyerSTRONG_ALIAS(_atomic_cas_64,_atomic_cas_cx8) 225efd0e73eSbouyer#else 2266740bb54SchsENTRY(_atomic_cas_64) 227712bef21Smaxv HOTPATCH_CAS_64 228712bef21Smaxv /* 49 bytes of instructions */ 22957561cf1Schristos#ifdef _HARDKERNEL 23030fd42e8Sad pushf 231163e94a6Sad cli 232712bef21Smaxv#endif 233163e94a6Sad pushl %edi 234163e94a6Sad pushl %ebx 235163e94a6Sad movl 12(%esp), %edi 236163e94a6Sad movl 16(%esp), %eax 237163e94a6Sad movl 20(%esp), %edx 238163e94a6Sad movl 24(%esp), %ebx 239163e94a6Sad movl 28(%esp), %ecx 240163e94a6Sad cmpl 0(%edi), %eax 241163e94a6Sad jne 2f 242163e94a6Sad cmpl 4(%edi), %edx 243163e94a6Sad jne 2f 244163e94a6Sad movl %ebx, 0(%edi) 245163e94a6Sad movl %ecx, 4(%edi) 246163e94a6Sad1: 247163e94a6Sad popl %ebx 248163e94a6Sad popl %edi 24957561cf1Schristos#ifdef _HARDKERNEL 25030fd42e8Sad popf 251712bef21Smaxv#endif 252163e94a6Sad ret 253163e94a6Sad2: 254163e94a6Sad movl 0(%edi), %eax 255163e94a6Sad movl 4(%edi), %edx 256163e94a6Sad jmp 1b 25719ef5b5bSuebayasiEND(_atomic_cas_64) 258712bef21Smaxv#endif /* !XENPV */ 259163e94a6Sad 2606740bb54SchsENTRY(_atomic_cas_cx8) 261712bef21Smaxv /* 49 bytes of instructions */ 262163e94a6Sad pushl %edi 263163e94a6Sad pushl %ebx 264163e94a6Sad movl 12(%esp), %edi 265163e94a6Sad movl 16(%esp), %eax 266163e94a6Sad movl 20(%esp), %edx 267163e94a6Sad movl 24(%esp), %ebx 268163e94a6Sad movl 28(%esp), %ecx 269f012eec2Smaxv LOCK 270163e94a6Sad cmpxchg8b (%edi) 271163e94a6Sad popl %ebx 272163e94a6Sad popl %edi 273163e94a6Sad ret 27457561cf1Schristos#ifdef _HARDKERNEL 275712bef21Smaxv .space 20, 0xCC 27609fcc8b3Senami#endif 27719ef5b5bSuebayasiEND(_atomic_cas_cx8) 278712bef21SmaxvLABEL(_atomic_cas_cx8_end) 27957561cf1Schristos#endif /* __HAVE_ATOMIC64_OPS || _KERNEL */ 280163e94a6Sad 28165728ed4SadALIAS(atomic_add_32,_atomic_add_32) 2826f3a0417SadALIAS(atomic_add_int,_atomic_add_32) 2836f3a0417SadALIAS(atomic_add_long,_atomic_add_32) 28465728ed4SadALIAS(atomic_add_ptr,_atomic_add_32) 28565728ed4Sad 28665728ed4SadALIAS(atomic_add_32_nv,_atomic_add_32_nv) 2876f3a0417SadALIAS(atomic_add_int_nv,_atomic_add_32_nv) 2886f3a0417SadALIAS(atomic_add_long_nv,_atomic_add_32_nv) 28965728ed4SadALIAS(atomic_add_ptr_nv,_atomic_add_32_nv) 29065728ed4Sad 29165728ed4SadALIAS(atomic_and_32,_atomic_and_32) 29265728ed4SadALIAS(atomic_and_uint,_atomic_and_32) 29365728ed4SadALIAS(atomic_and_ulong,_atomic_and_32) 29465728ed4SadALIAS(atomic_and_ptr,_atomic_and_32) 29565728ed4Sad 29665728ed4SadALIAS(atomic_and_32_nv,_atomic_and_32_nv) 29765728ed4SadALIAS(atomic_and_uint_nv,_atomic_and_32_nv) 29865728ed4SadALIAS(atomic_and_ulong_nv,_atomic_and_32_nv) 29965728ed4SadALIAS(atomic_and_ptr_nv,_atomic_and_32_nv) 30065728ed4Sad 30165728ed4SadALIAS(atomic_dec_32,_atomic_dec_32) 30265728ed4SadALIAS(atomic_dec_uint,_atomic_dec_32) 30365728ed4SadALIAS(atomic_dec_ulong,_atomic_dec_32) 30465728ed4SadALIAS(atomic_dec_ptr,_atomic_dec_32) 30565728ed4Sad 30665728ed4SadALIAS(atomic_dec_32_nv,_atomic_dec_32_nv) 30765728ed4SadALIAS(atomic_dec_uint_nv,_atomic_dec_32_nv) 30865728ed4SadALIAS(atomic_dec_ulong_nv,_atomic_dec_32_nv) 30965728ed4SadALIAS(atomic_dec_ptr_nv,_atomic_dec_32_nv) 31065728ed4Sad 31165728ed4SadALIAS(atomic_inc_32,_atomic_inc_32) 31265728ed4SadALIAS(atomic_inc_uint,_atomic_inc_32) 31365728ed4SadALIAS(atomic_inc_ulong,_atomic_inc_32) 31465728ed4SadALIAS(atomic_inc_ptr,_atomic_inc_32) 31565728ed4Sad 31665728ed4SadALIAS(atomic_inc_32_nv,_atomic_inc_32_nv) 31765728ed4SadALIAS(atomic_inc_uint_nv,_atomic_inc_32_nv) 31865728ed4SadALIAS(atomic_inc_ulong_nv,_atomic_inc_32_nv) 31965728ed4SadALIAS(atomic_inc_ptr_nv,_atomic_inc_32_nv) 32065728ed4Sad 32165728ed4SadALIAS(atomic_or_32,_atomic_or_32) 32265728ed4SadALIAS(atomic_or_uint,_atomic_or_32) 32365728ed4SadALIAS(atomic_or_ulong,_atomic_or_32) 32465728ed4SadALIAS(atomic_or_ptr,_atomic_or_32) 32565728ed4Sad 32665728ed4SadALIAS(atomic_or_32_nv,_atomic_or_32_nv) 32765728ed4SadALIAS(atomic_or_uint_nv,_atomic_or_32_nv) 32865728ed4SadALIAS(atomic_or_ulong_nv,_atomic_or_32_nv) 32965728ed4SadALIAS(atomic_or_ptr_nv,_atomic_or_32_nv) 33065728ed4Sad 33165728ed4SadALIAS(atomic_swap_32,_atomic_swap_32) 33265728ed4SadALIAS(atomic_swap_uint,_atomic_swap_32) 33365728ed4SadALIAS(atomic_swap_ulong,_atomic_swap_32) 33465728ed4SadALIAS(atomic_swap_ptr,_atomic_swap_32) 33565728ed4Sad 33665728ed4SadALIAS(atomic_cas_32,_atomic_cas_32) 33765728ed4SadALIAS(atomic_cas_uint,_atomic_cas_32) 33865728ed4SadALIAS(atomic_cas_ulong,_atomic_cas_32) 33965728ed4SadALIAS(atomic_cas_ptr,_atomic_cas_32) 34065728ed4Sad 341cc655ebdSadALIAS(atomic_cas_32_ni,_atomic_cas_32_ni) 342cc655ebdSadALIAS(atomic_cas_uint_ni,_atomic_cas_32_ni) 343cc655ebdSadALIAS(atomic_cas_ulong_ni,_atomic_cas_32_ni) 344cc655ebdSadALIAS(atomic_cas_ptr_ni,_atomic_cas_32_ni) 345cc655ebdSad 34657561cf1Schristos#if defined(__HAVE_ATOMIC64_OPS) || defined(_KERNEL) 347163e94a6SadALIAS(atomic_cas_64,_atomic_cas_64) 348cc655ebdSadALIAS(atomic_cas_64_ni,_atomic_cas_64) 3497c94bf08SmartinALIAS(__sync_val_compare_and_swap_8,_atomic_cas_64) 35057561cf1Schristos#endif /* __HAVE_ATOMIC64_OPS || _KERNEL */ 351163e94a6Sad 3524f8ce3b3SriastradhALIAS(membar_acquire,_membar_acquire) 3534f8ce3b3SriastradhALIAS(membar_release,_membar_release) 3544f8ce3b3SriastradhALIAS(membar_sync,_membar_sync) 3554f8ce3b3Sriastradh 3564f8ce3b3SriastradhALIAS(membar_consumer,_membar_acquire) 3574f8ce3b3SriastradhALIAS(membar_producer,_membar_release) 358a1f4bcbfSriastradhALIAS(membar_enter,_membar_sync) 3594f8ce3b3SriastradhALIAS(membar_exit,_membar_release) 36065728ed4SadALIAS(membar_sync,_membar_sync) 361164992f1Sad 362164992f1SadSTRONG_ALIAS(_atomic_add_int,_atomic_add_32) 363164992f1SadSTRONG_ALIAS(_atomic_add_long,_atomic_add_32) 364164992f1SadSTRONG_ALIAS(_atomic_add_ptr,_atomic_add_32) 365164992f1Sad 366164992f1SadSTRONG_ALIAS(_atomic_add_int_nv,_atomic_add_32_nv) 367164992f1SadSTRONG_ALIAS(_atomic_add_long_nv,_atomic_add_32_nv) 368164992f1SadSTRONG_ALIAS(_atomic_add_ptr_nv,_atomic_add_32_nv) 369164992f1Sad 370164992f1SadSTRONG_ALIAS(_atomic_and_uint,_atomic_and_32) 371164992f1SadSTRONG_ALIAS(_atomic_and_ulong,_atomic_and_32) 372164992f1SadSTRONG_ALIAS(_atomic_and_ptr,_atomic_and_32) 373164992f1Sad 374164992f1SadSTRONG_ALIAS(_atomic_and_uint_nv,_atomic_and_32_nv) 375164992f1SadSTRONG_ALIAS(_atomic_and_ulong_nv,_atomic_and_32_nv) 376164992f1SadSTRONG_ALIAS(_atomic_and_ptr_nv,_atomic_and_32_nv) 377164992f1Sad 378164992f1SadSTRONG_ALIAS(_atomic_dec_uint,_atomic_dec_32) 379164992f1SadSTRONG_ALIAS(_atomic_dec_ulong,_atomic_dec_32) 380164992f1SadSTRONG_ALIAS(_atomic_dec_ptr,_atomic_dec_32) 381164992f1Sad 382164992f1SadSTRONG_ALIAS(_atomic_dec_uint_nv,_atomic_dec_32_nv) 383164992f1SadSTRONG_ALIAS(_atomic_dec_ulong_nv,_atomic_dec_32_nv) 384164992f1SadSTRONG_ALIAS(_atomic_dec_ptr_nv,_atomic_dec_32_nv) 385164992f1Sad 386164992f1SadSTRONG_ALIAS(_atomic_inc_uint,_atomic_inc_32) 387164992f1SadSTRONG_ALIAS(_atomic_inc_ulong,_atomic_inc_32) 388164992f1SadSTRONG_ALIAS(_atomic_inc_ptr,_atomic_inc_32) 389164992f1Sad 390164992f1SadSTRONG_ALIAS(_atomic_inc_uint_nv,_atomic_inc_32_nv) 391164992f1SadSTRONG_ALIAS(_atomic_inc_ulong_nv,_atomic_inc_32_nv) 392164992f1SadSTRONG_ALIAS(_atomic_inc_ptr_nv,_atomic_inc_32_nv) 393164992f1Sad 394164992f1SadSTRONG_ALIAS(_atomic_or_uint,_atomic_or_32) 395164992f1SadSTRONG_ALIAS(_atomic_or_ulong,_atomic_or_32) 396164992f1SadSTRONG_ALIAS(_atomic_or_ptr,_atomic_or_32) 397164992f1Sad 398164992f1SadSTRONG_ALIAS(_atomic_or_uint_nv,_atomic_or_32_nv) 399164992f1SadSTRONG_ALIAS(_atomic_or_ulong_nv,_atomic_or_32_nv) 400164992f1SadSTRONG_ALIAS(_atomic_or_ptr_nv,_atomic_or_32_nv) 401164992f1Sad 402164992f1SadSTRONG_ALIAS(_atomic_swap_uint,_atomic_swap_32) 403164992f1SadSTRONG_ALIAS(_atomic_swap_ulong,_atomic_swap_32) 404164992f1SadSTRONG_ALIAS(_atomic_swap_ptr,_atomic_swap_32) 405164992f1Sad 406164992f1SadSTRONG_ALIAS(_atomic_cas_uint,_atomic_cas_32) 407164992f1SadSTRONG_ALIAS(_atomic_cas_ulong,_atomic_cas_32) 408164992f1SadSTRONG_ALIAS(_atomic_cas_ptr,_atomic_cas_32) 409a180c2a1Sad 410cc655ebdSadSTRONG_ALIAS(_atomic_cas_uint_ni,_atomic_cas_32_ni) 411cc655ebdSadSTRONG_ALIAS(_atomic_cas_ulong_ni,_atomic_cas_32_ni) 412cc655ebdSadSTRONG_ALIAS(_atomic_cas_ptr_ni,_atomic_cas_32_ni) 413cc655ebdSad 4144f8ce3b3SriastradhSTRONG_ALIAS(_membar_consumer,_membar_acquire) 4154f8ce3b3SriastradhSTRONG_ALIAS(_membar_producer,_membar_release) 416a1f4bcbfSriastradhSTRONG_ALIAS(_membar_enter,_membar_sync) 4174f8ce3b3SriastradhSTRONG_ALIAS(_membar_exit,_membar_release) 418