Home | History | Annotate | Line # | Download | only in atomic
atomic.S revision 1.28
      1  1.28      maxv /*	$NetBSD: atomic.S,v 1.28 2020/04/26 14:49:17 maxv Exp $	*/
      2   1.1        ad 
      3   1.1        ad /*-
      4   1.1        ad  * Copyright (c) 2007 The NetBSD Foundation, Inc.
      5   1.1        ad  * All rights reserved.
      6   1.1        ad  *
      7   1.1        ad  * This code is derived from software contributed to The NetBSD Foundation
      8   1.1        ad  * by Jason R. Thorpe, and by Andrew Doran.
      9   1.1        ad  *
     10   1.1        ad  * Redistribution and use in source and binary forms, with or without
     11   1.1        ad  * modification, are permitted provided that the following conditions
     12   1.1        ad  * are met:
     13   1.1        ad  * 1. Redistributions of source code must retain the above copyright
     14   1.1        ad  *    notice, this list of conditions and the following disclaimer.
     15   1.1        ad  * 2. Redistributions in binary form must reproduce the above copyright
     16   1.1        ad  *    notice, this list of conditions and the following disclaimer in the
     17   1.1        ad  *    documentation and/or other materials provided with the distribution.
     18   1.1        ad  *
     19   1.1        ad  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     20   1.1        ad  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     21   1.1        ad  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     22   1.1        ad  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     23   1.1        ad  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24   1.1        ad  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25   1.1        ad  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26   1.1        ad  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27   1.1        ad  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28   1.1        ad  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29   1.1        ad  * POSSIBILITY OF SUCH DAMAGE.
     30   1.1        ad  */
     31   1.1        ad 
     32  1.16     pooka #include <sys/param.h>
     33   1.1        ad #include <machine/asm.h>
     34  1.21  christos /*
     35  1.21  christos  * __HAVE_ constants should not be in <machine/types.h>
     36  1.21  christos  * because we can't use them from assembly. OTOH we
     37  1.21  christos  * only need __HAVE_ATOMIC64_OPS here, and we don't.
     38  1.21  christos  */
     39  1.18     pooka #ifdef _KERNEL
     40  1.18     pooka #define	ALIAS(f, t)	STRONG_ALIAS(f,t)
     41  1.18     pooka #else
     42  1.18     pooka #define	ALIAS(f, t)	WEAK_ALIAS(f,t)
     43  1.18     pooka #endif
     44  1.18     pooka 
     45  1.15     pooka #ifdef _HARDKERNEL
     46  1.23    bouyer #include "opt_xen.h"
     47  1.25      maxv #include <machine/frameasm.h>
     48  1.28      maxv #define LOCK			HOTPATCH(HP_NAME_NOLOCK, 1); lock
     49  1.28      maxv #define HOTPATCH_SSE2_LFENCE	HOTPATCH(HP_NAME_SSE2_LFENCE, 7);
     50  1.28      maxv #define HOTPATCH_SSE2_MFENCE	HOTPATCH(HP_NAME_SSE2_MFENCE, 7);
     51  1.28      maxv #define ENDLABEL(a)		_ALIGN_TEXT; LABEL(a)
     52   1.1        ad #else
     53  1.28      maxv #define LOCK			lock
     54  1.28      maxv #define HOTPATCH_SSE2_LFENCE	/* nothing */
     55  1.28      maxv #define HOTPATCH_SSE2_MFENCE	/* nothing */
     56  1.28      maxv #define ENDLABEL(a)		/* nothing */
     57   1.1        ad #endif
     58   1.1        ad 
     59   1.1        ad 	.text
     60   1.1        ad 
     61  1.13       chs ENTRY(_atomic_add_32)
     62   1.1        ad 	movl	4(%esp), %edx
     63   1.1        ad 	movl	8(%esp), %eax
     64  1.27      maxv 	LOCK
     65   1.1        ad 	addl	%eax, (%edx)
     66   1.1        ad 	ret
     67  1.22  uebayasi END(_atomic_add_32)
     68   1.1        ad 
     69  1.13       chs ENTRY(_atomic_add_32_nv)
     70   1.1        ad 	movl	4(%esp), %edx
     71   1.1        ad 	movl	8(%esp), %eax
     72   1.1        ad 	movl	%eax, %ecx
     73  1.27      maxv 	LOCK
     74   1.1        ad 	xaddl	%eax, (%edx)
     75   1.1        ad 	addl	%ecx, %eax
     76   1.1        ad 	ret
     77  1.22  uebayasi END(_atomic_add_32_nv)
     78   1.1        ad 
     79  1.13       chs ENTRY(_atomic_and_32)
     80   1.1        ad 	movl	4(%esp), %edx
     81   1.1        ad 	movl	8(%esp), %eax
     82  1.27      maxv 	LOCK
     83   1.1        ad 	andl	%eax, (%edx)
     84   1.1        ad 	ret
     85  1.22  uebayasi END(_atomic_and_32)
     86   1.1        ad 
     87  1.13       chs ENTRY(_atomic_and_32_nv)
     88   1.1        ad 	movl	4(%esp), %edx
     89   1.1        ad 	movl	(%edx), %eax
     90  1.14        ad 0:
     91   1.1        ad 	movl	%eax, %ecx
     92   1.1        ad 	andl	8(%esp), %ecx
     93  1.27      maxv 	LOCK
     94   1.1        ad 	cmpxchgl %ecx, (%edx)
     95  1.14        ad 	jnz	1f
     96   1.1        ad 	movl	%ecx, %eax
     97   1.1        ad 	ret
     98  1.14        ad 1:
     99  1.14        ad 	jmp	0b
    100  1.22  uebayasi END(_atomic_and_32_nv)
    101   1.1        ad 
    102  1.13       chs ENTRY(_atomic_dec_32)
    103   1.1        ad 	movl	4(%esp), %edx
    104  1.27      maxv 	LOCK
    105   1.1        ad 	decl	(%edx)
    106   1.1        ad 	ret
    107  1.22  uebayasi END(_atomic_dec_32)
    108   1.1        ad 
    109  1.13       chs ENTRY(_atomic_dec_32_nv)
    110   1.1        ad 	movl	4(%esp), %edx
    111   1.1        ad 	movl	$-1, %eax
    112  1.27      maxv 	LOCK
    113   1.1        ad 	xaddl	%eax, (%edx)
    114   1.1        ad 	decl	%eax
    115   1.1        ad 	ret
    116  1.22  uebayasi END(_atomic_dec_32_nv)
    117   1.1        ad 
    118  1.13       chs ENTRY(_atomic_inc_32)
    119   1.1        ad 	movl	4(%esp), %edx
    120  1.27      maxv 	LOCK
    121   1.1        ad 	incl	(%edx)
    122   1.1        ad 	ret
    123  1.22  uebayasi END(_atomic_inc_32)
    124   1.1        ad 
    125  1.13       chs ENTRY(_atomic_inc_32_nv)
    126   1.1        ad 	movl	4(%esp), %edx
    127   1.1        ad 	movl	$1, %eax
    128  1.27      maxv 	LOCK
    129   1.1        ad 	xaddl	%eax, (%edx)
    130   1.1        ad 	incl	%eax
    131   1.1        ad 	ret
    132  1.22  uebayasi END(_atomic_inc_32_nv)
    133   1.1        ad 
    134  1.13       chs ENTRY(_atomic_or_32)
    135   1.1        ad 	movl	4(%esp), %edx
    136   1.1        ad 	movl	8(%esp), %eax
    137  1.27      maxv 	LOCK
    138   1.1        ad 	orl	%eax, (%edx)
    139   1.1        ad 	ret
    140  1.22  uebayasi END(_atomic_or_32)
    141   1.1        ad 
    142  1.13       chs ENTRY(_atomic_or_32_nv)
    143   1.1        ad 	movl	4(%esp), %edx
    144   1.1        ad 	movl	(%edx), %eax
    145  1.14        ad 0:
    146   1.1        ad 	movl	%eax, %ecx
    147   1.1        ad 	orl	8(%esp), %ecx
    148  1.27      maxv 	LOCK
    149   1.1        ad 	cmpxchgl %ecx, (%edx)
    150  1.14        ad 	jnz	1f
    151   1.1        ad 	movl	%ecx, %eax
    152   1.1        ad 	ret
    153  1.14        ad 1:
    154  1.14        ad 	jmp	0b
    155  1.22  uebayasi END(_atomic_or_32_nv)
    156   1.1        ad 
    157  1.13       chs ENTRY(_atomic_swap_32)
    158   1.1        ad 	movl	4(%esp), %edx
    159   1.1        ad 	movl	8(%esp), %eax
    160   1.1        ad 	xchgl	%eax, (%edx)
    161   1.1        ad 	ret
    162  1.22  uebayasi END(_atomic_swap_32)
    163   1.1        ad 
    164  1.13       chs ENTRY(_atomic_cas_32)
    165   1.1        ad 	movl	4(%esp), %edx
    166   1.1        ad 	movl	8(%esp), %eax
    167   1.1        ad 	movl	12(%esp), %ecx
    168  1.27      maxv 	LOCK
    169   1.1        ad 	cmpxchgl %ecx, (%edx)
    170   1.1        ad 	/* %eax now contains the old value */
    171   1.1        ad 	ret
    172  1.22  uebayasi END(_atomic_cas_32)
    173   1.1        ad 
    174  1.13       chs ENTRY(_atomic_cas_32_ni)
    175   1.9        ad 	movl	4(%esp), %edx
    176   1.9        ad 	movl	8(%esp), %eax
    177   1.9        ad 	movl	12(%esp), %ecx
    178   1.9        ad 	cmpxchgl %ecx, (%edx)
    179   1.9        ad 	/* %eax now contains the old value */
    180   1.9        ad 	ret
    181  1.22  uebayasi END(_atomic_cas_32_ni)
    182   1.9        ad 
    183  1.13       chs ENTRY(_membar_consumer)
    184  1.28      maxv 	HOTPATCH_SSE2_LFENCE
    185  1.28      maxv 	/* 7 bytes of instructions */
    186  1.27      maxv 	LOCK
    187   1.1        ad 	addl	$0, -4(%esp)
    188   1.1        ad 	ret
    189  1.22  uebayasi END(_membar_consumer)
    190   1.1        ad 
    191  1.13       chs ENTRY(_membar_producer)
    192   1.1        ad 	/* A store is enough */
    193   1.1        ad 	movl	$0, -4(%esp)
    194   1.1        ad 	ret
    195  1.22  uebayasi END(_membar_producer)
    196   1.1        ad 
    197  1.13       chs ENTRY(_membar_sync)
    198  1.28      maxv 	HOTPATCH_SSE2_MFENCE
    199  1.28      maxv 	/* 7 bytes of instructions */
    200  1.27      maxv 	LOCK
    201   1.1        ad 	addl	$0, -4(%esp)
    202   1.1        ad 	ret
    203  1.22  uebayasi END(_membar_sync)
    204   1.1        ad 
    205  1.21  christos #if defined(__HAVE_ATOMIC64_OPS) || defined(_KERNEL)
    206  1.24    bouyer #ifdef XENPV
    207  1.23    bouyer STRONG_ALIAS(_atomic_cas_64,_atomic_cas_cx8)
    208  1.23    bouyer #else
    209  1.21  christos ENTRY(_atomic_cas_64)
    210  1.15     pooka #ifdef _HARDKERNEL
    211  1.14        ad 	pushf
    212   1.6        ad 	cli
    213  1.21  christos #endif /* _HARDKERNEL */
    214   1.6        ad 	pushl	%edi
    215   1.6        ad 	pushl	%ebx
    216   1.6        ad 	movl	12(%esp), %edi
    217   1.6        ad 	movl	16(%esp), %eax
    218   1.6        ad 	movl	20(%esp), %edx
    219   1.6        ad 	movl	24(%esp), %ebx
    220   1.6        ad 	movl	28(%esp), %ecx
    221   1.6        ad 	cmpl	0(%edi), %eax
    222   1.6        ad 	jne	2f
    223   1.6        ad 	cmpl	4(%edi), %edx
    224   1.6        ad 	jne	2f
    225   1.6        ad 	movl	%ebx, 0(%edi)
    226   1.6        ad 	movl	%ecx, 4(%edi)
    227   1.6        ad 1:
    228   1.6        ad 	popl	%ebx
    229   1.6        ad 	popl	%edi
    230  1.21  christos #ifdef _HARDKERNEL
    231  1.14        ad 	popf
    232  1.21  christos #endif /* _HARDKERNEL */
    233   1.6        ad 	ret
    234   1.6        ad 2:
    235   1.6        ad 	movl	0(%edi), %eax
    236   1.6        ad 	movl	4(%edi), %edx
    237   1.6        ad 	jmp	1b
    238  1.22  uebayasi END(_atomic_cas_64)
    239  1.11      yamt ENDLABEL(_atomic_cas_64_end)
    240  1.23    bouyer #endif /* !XEN */
    241   1.6        ad 
    242  1.13       chs ENTRY(_atomic_cas_cx8)
    243   1.6        ad 	pushl	%edi
    244   1.6        ad 	pushl	%ebx
    245   1.6        ad 	movl	12(%esp), %edi
    246   1.6        ad 	movl	16(%esp), %eax
    247   1.6        ad 	movl	20(%esp), %edx
    248   1.6        ad 	movl	24(%esp), %ebx
    249   1.6        ad 	movl	28(%esp), %ecx
    250  1.27      maxv 	LOCK
    251   1.6        ad 	cmpxchg8b (%edi)
    252   1.6        ad 	popl	%ebx
    253   1.6        ad 	popl	%edi
    254   1.6        ad 	ret
    255  1.21  christos #ifdef _HARDKERNEL
    256  1.17     enami #ifdef GPROF
    257  1.17     enami 	.space	16, 0x90
    258  1.17     enami #else
    259   1.7        ad 	.space	32, 0x90
    260  1.17     enami #endif
    261  1.21  christos #endif /* _HARDKERNEL */
    262  1.22  uebayasi END(_atomic_cas_cx8)
    263  1.11      yamt ENDLABEL(_atomic_cas_cx8_end)
    264  1.21  christos #endif /* __HAVE_ATOMIC64_OPS || _KERNEL */
    265   1.6        ad 
    266   1.1        ad ALIAS(atomic_add_32,_atomic_add_32)
    267   1.4        ad ALIAS(atomic_add_int,_atomic_add_32)
    268   1.4        ad ALIAS(atomic_add_long,_atomic_add_32)
    269   1.1        ad ALIAS(atomic_add_ptr,_atomic_add_32)
    270   1.1        ad 
    271   1.1        ad ALIAS(atomic_add_32_nv,_atomic_add_32_nv)
    272   1.4        ad ALIAS(atomic_add_int_nv,_atomic_add_32_nv)
    273   1.4        ad ALIAS(atomic_add_long_nv,_atomic_add_32_nv)
    274   1.1        ad ALIAS(atomic_add_ptr_nv,_atomic_add_32_nv)
    275   1.1        ad 
    276   1.1        ad ALIAS(atomic_and_32,_atomic_and_32)
    277   1.1        ad ALIAS(atomic_and_uint,_atomic_and_32)
    278   1.1        ad ALIAS(atomic_and_ulong,_atomic_and_32)
    279   1.1        ad ALIAS(atomic_and_ptr,_atomic_and_32)
    280   1.1        ad 
    281   1.1        ad ALIAS(atomic_and_32_nv,_atomic_and_32_nv)
    282   1.1        ad ALIAS(atomic_and_uint_nv,_atomic_and_32_nv)
    283   1.1        ad ALIAS(atomic_and_ulong_nv,_atomic_and_32_nv)
    284   1.1        ad ALIAS(atomic_and_ptr_nv,_atomic_and_32_nv)
    285   1.1        ad 
    286   1.1        ad ALIAS(atomic_dec_32,_atomic_dec_32)
    287   1.1        ad ALIAS(atomic_dec_uint,_atomic_dec_32)
    288   1.1        ad ALIAS(atomic_dec_ulong,_atomic_dec_32)
    289   1.1        ad ALIAS(atomic_dec_ptr,_atomic_dec_32)
    290   1.1        ad 
    291   1.1        ad ALIAS(atomic_dec_32_nv,_atomic_dec_32_nv)
    292   1.1        ad ALIAS(atomic_dec_uint_nv,_atomic_dec_32_nv)
    293   1.1        ad ALIAS(atomic_dec_ulong_nv,_atomic_dec_32_nv)
    294   1.1        ad ALIAS(atomic_dec_ptr_nv,_atomic_dec_32_nv)
    295   1.1        ad 
    296   1.1        ad ALIAS(atomic_inc_32,_atomic_inc_32)
    297   1.1        ad ALIAS(atomic_inc_uint,_atomic_inc_32)
    298   1.1        ad ALIAS(atomic_inc_ulong,_atomic_inc_32)
    299   1.1        ad ALIAS(atomic_inc_ptr,_atomic_inc_32)
    300   1.1        ad 
    301   1.1        ad ALIAS(atomic_inc_32_nv,_atomic_inc_32_nv)
    302   1.1        ad ALIAS(atomic_inc_uint_nv,_atomic_inc_32_nv)
    303   1.1        ad ALIAS(atomic_inc_ulong_nv,_atomic_inc_32_nv)
    304   1.1        ad ALIAS(atomic_inc_ptr_nv,_atomic_inc_32_nv)
    305   1.1        ad 
    306   1.1        ad ALIAS(atomic_or_32,_atomic_or_32)
    307   1.1        ad ALIAS(atomic_or_uint,_atomic_or_32)
    308   1.1        ad ALIAS(atomic_or_ulong,_atomic_or_32)
    309   1.1        ad ALIAS(atomic_or_ptr,_atomic_or_32)
    310   1.1        ad 
    311   1.1        ad ALIAS(atomic_or_32_nv,_atomic_or_32_nv)
    312   1.1        ad ALIAS(atomic_or_uint_nv,_atomic_or_32_nv)
    313   1.1        ad ALIAS(atomic_or_ulong_nv,_atomic_or_32_nv)
    314   1.1        ad ALIAS(atomic_or_ptr_nv,_atomic_or_32_nv)
    315   1.1        ad 
    316   1.1        ad ALIAS(atomic_swap_32,_atomic_swap_32)
    317   1.1        ad ALIAS(atomic_swap_uint,_atomic_swap_32)
    318   1.1        ad ALIAS(atomic_swap_ulong,_atomic_swap_32)
    319   1.1        ad ALIAS(atomic_swap_ptr,_atomic_swap_32)
    320   1.1        ad 
    321   1.1        ad ALIAS(atomic_cas_32,_atomic_cas_32)
    322   1.1        ad ALIAS(atomic_cas_uint,_atomic_cas_32)
    323   1.1        ad ALIAS(atomic_cas_ulong,_atomic_cas_32)
    324   1.1        ad ALIAS(atomic_cas_ptr,_atomic_cas_32)
    325   1.1        ad 
    326   1.9        ad ALIAS(atomic_cas_32_ni,_atomic_cas_32_ni)
    327   1.9        ad ALIAS(atomic_cas_uint_ni,_atomic_cas_32_ni)
    328   1.9        ad ALIAS(atomic_cas_ulong_ni,_atomic_cas_32_ni)
    329   1.9        ad ALIAS(atomic_cas_ptr_ni,_atomic_cas_32_ni)
    330   1.9        ad 
    331  1.21  christos #if defined(__HAVE_ATOMIC64_OPS) || defined(_KERNEL)
    332   1.6        ad ALIAS(atomic_cas_64,_atomic_cas_64)
    333   1.9        ad ALIAS(atomic_cas_64_ni,_atomic_cas_64)
    334  1.20    martin ALIAS(__sync_val_compare_and_swap_8,_atomic_cas_64)
    335  1.21  christos #endif /* __HAVE_ATOMIC64_OPS || _KERNEL */
    336   1.6        ad 
    337   1.1        ad ALIAS(membar_consumer,_membar_consumer)
    338   1.1        ad ALIAS(membar_producer,_membar_producer)
    339   1.8        ad ALIAS(membar_enter,_membar_consumer)
    340   1.8        ad ALIAS(membar_exit,_membar_producer)
    341   1.1        ad ALIAS(membar_sync,_membar_sync)
    342   1.5        ad 
    343   1.5        ad STRONG_ALIAS(_atomic_add_int,_atomic_add_32)
    344   1.5        ad STRONG_ALIAS(_atomic_add_long,_atomic_add_32)
    345   1.5        ad STRONG_ALIAS(_atomic_add_ptr,_atomic_add_32)
    346   1.5        ad 
    347   1.5        ad STRONG_ALIAS(_atomic_add_int_nv,_atomic_add_32_nv)
    348   1.5        ad STRONG_ALIAS(_atomic_add_long_nv,_atomic_add_32_nv)
    349   1.5        ad STRONG_ALIAS(_atomic_add_ptr_nv,_atomic_add_32_nv)
    350   1.5        ad 
    351   1.5        ad STRONG_ALIAS(_atomic_and_uint,_atomic_and_32)
    352   1.5        ad STRONG_ALIAS(_atomic_and_ulong,_atomic_and_32)
    353   1.5        ad STRONG_ALIAS(_atomic_and_ptr,_atomic_and_32)
    354   1.5        ad 
    355   1.5        ad STRONG_ALIAS(_atomic_and_uint_nv,_atomic_and_32_nv)
    356   1.5        ad STRONG_ALIAS(_atomic_and_ulong_nv,_atomic_and_32_nv)
    357   1.5        ad STRONG_ALIAS(_atomic_and_ptr_nv,_atomic_and_32_nv)
    358   1.5        ad 
    359   1.5        ad STRONG_ALIAS(_atomic_dec_uint,_atomic_dec_32)
    360   1.5        ad STRONG_ALIAS(_atomic_dec_ulong,_atomic_dec_32)
    361   1.5        ad STRONG_ALIAS(_atomic_dec_ptr,_atomic_dec_32)
    362   1.5        ad 
    363   1.5        ad STRONG_ALIAS(_atomic_dec_uint_nv,_atomic_dec_32_nv)
    364   1.5        ad STRONG_ALIAS(_atomic_dec_ulong_nv,_atomic_dec_32_nv)
    365   1.5        ad STRONG_ALIAS(_atomic_dec_ptr_nv,_atomic_dec_32_nv)
    366   1.5        ad 
    367   1.5        ad STRONG_ALIAS(_atomic_inc_uint,_atomic_inc_32)
    368   1.5        ad STRONG_ALIAS(_atomic_inc_ulong,_atomic_inc_32)
    369   1.5        ad STRONG_ALIAS(_atomic_inc_ptr,_atomic_inc_32)
    370   1.5        ad 
    371   1.5        ad STRONG_ALIAS(_atomic_inc_uint_nv,_atomic_inc_32_nv)
    372   1.5        ad STRONG_ALIAS(_atomic_inc_ulong_nv,_atomic_inc_32_nv)
    373   1.5        ad STRONG_ALIAS(_atomic_inc_ptr_nv,_atomic_inc_32_nv)
    374   1.5        ad 
    375   1.5        ad STRONG_ALIAS(_atomic_or_uint,_atomic_or_32)
    376   1.5        ad STRONG_ALIAS(_atomic_or_ulong,_atomic_or_32)
    377   1.5        ad STRONG_ALIAS(_atomic_or_ptr,_atomic_or_32)
    378   1.5        ad 
    379   1.5        ad STRONG_ALIAS(_atomic_or_uint_nv,_atomic_or_32_nv)
    380   1.5        ad STRONG_ALIAS(_atomic_or_ulong_nv,_atomic_or_32_nv)
    381   1.5        ad STRONG_ALIAS(_atomic_or_ptr_nv,_atomic_or_32_nv)
    382   1.5        ad 
    383   1.5        ad STRONG_ALIAS(_atomic_swap_uint,_atomic_swap_32)
    384   1.5        ad STRONG_ALIAS(_atomic_swap_ulong,_atomic_swap_32)
    385   1.5        ad STRONG_ALIAS(_atomic_swap_ptr,_atomic_swap_32)
    386   1.5        ad 
    387   1.5        ad STRONG_ALIAS(_atomic_cas_uint,_atomic_cas_32)
    388   1.5        ad STRONG_ALIAS(_atomic_cas_ulong,_atomic_cas_32)
    389   1.5        ad STRONG_ALIAS(_atomic_cas_ptr,_atomic_cas_32)
    390   1.8        ad 
    391   1.9        ad STRONG_ALIAS(_atomic_cas_uint_ni,_atomic_cas_32_ni)
    392   1.9        ad STRONG_ALIAS(_atomic_cas_ulong_ni,_atomic_cas_32_ni)
    393   1.9        ad STRONG_ALIAS(_atomic_cas_ptr_ni,_atomic_cas_32_ni)
    394   1.9        ad 
    395   1.8        ad STRONG_ALIAS(_membar_enter,_membar_consumer)
    396   1.8        ad STRONG_ALIAS(_membar_exit,_membar_producer)
    397  1.28      maxv 
    398  1.28      maxv #ifdef _HARDKERNEL
    399  1.28      maxv 	.section .rodata
    400  1.28      maxv 
    401  1.28      maxv LABEL(sse2_lfence)
    402  1.28      maxv 	lfence
    403  1.28      maxv 	ret
    404  1.28      maxv 	nop; nop; nop;
    405  1.28      maxv LABEL(sse2_lfence_end)
    406  1.28      maxv 
    407  1.28      maxv LABEL(sse2_mfence)
    408  1.28      maxv 	mfence
    409  1.28      maxv 	ret
    410  1.28      maxv 	nop; nop; nop;
    411  1.28      maxv LABEL(sse2_mfence_end)
    412  1.28      maxv #endif	/* _HARDKERNEL */
    413