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