source: tests/builtins/sync.cfa @ ce12e2b

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since ce12e2b was c64e979, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Added atomic operations on pointers and fixed some mistakes

  • Property mode set to 100644
File size: 24.5 KB
Line 
1#include <stdbool.h>
2#include <stdint.h>
3
4void foo() {
5        volatile _Bool * vpB = 0; _Bool vB = 0;
6        volatile char * vp1 = 0; char * rp1 = 0; char v1 = 0;
7        volatile short * vp2 = 0; short * rp2 = 0; short v2 = 0;
8        volatile int * vp4 = 0; int * rp4 = 0; int v4 = 0;
9        volatile long long int * vp8 = 0; long long int * rp8 = 0; long long int v8 = 0;
10        #if defined(__SIZEOF_INT128__)
11        volatile __int128 * vp16 = 0; __int128 * rp16 = 0; __int128 v16 = 0;
12        #endif
13        struct type * volatile * vpp = 0; struct type ** rpp = 0; struct type * vp = 0;
14
15        { char ret; ret = __sync_fetch_and_add(vp1, v1); }
16        { char ret; ret = __sync_fetch_and_add_1(vp1, v1); }
17        { short ret; ret = __sync_fetch_and_add(vp2, v2); }
18        { short ret; ret = __sync_fetch_and_add_2(vp2, v2); }
19        { int ret; ret = __sync_fetch_and_add(vp4, v4); }
20        { int ret; ret = __sync_fetch_and_add_4(vp4, v4); }
21        { long long int ret; ret = __sync_fetch_and_add(vp8, v8); }
22        { long long int ret; ret = __sync_fetch_and_add_8(vp8, v8); }
23        #if defined(__SIZEOF_INT128__)
24        { __int128 ret; ret = __sync_fetch_and_add(vp16, v16); }
25        { __int128 ret; ret = __sync_fetch_and_add_16(vp16, v16); }
26        #endif
27
28        { char ret; ret = __sync_fetch_and_sub(vp1, v1); }
29        { char ret; ret = __sync_fetch_and_sub_1(vp1, v1); }
30        { short ret; ret = __sync_fetch_and_sub(vp2, v2); }
31        { short ret; ret = __sync_fetch_and_sub_2(vp2, v2); }
32        { int ret; ret = __sync_fetch_and_sub(vp4, v4); }
33        { int ret; ret = __sync_fetch_and_sub_4(vp4, v4); }
34        { long long int ret; ret = __sync_fetch_and_sub(vp8, v8); }
35        { long long int ret; ret = __sync_fetch_and_sub_8(vp8, v8); }
36        #if defined(__SIZEOF_INT128__)
37        { __int128 ret; ret = __sync_fetch_and_sub(vp16, v16); }
38        { __int128 ret; ret = __sync_fetch_and_sub_16(vp16, v16); }
39        #endif
40
41        { char ret; ret = __sync_fetch_and_or(vp1, v1); }
42        { char ret; ret = __sync_fetch_and_or_1(vp1, v1); }
43        { short ret; ret = __sync_fetch_and_or(vp2, v2); }
44        { short ret; ret = __sync_fetch_and_or_2(vp2, v2); }
45        { int ret; ret = __sync_fetch_and_or(vp4, v4); }
46        { int ret; ret = __sync_fetch_and_or_4(vp4, v4); }
47        { long long int ret; ret = __sync_fetch_and_or(vp8, v8); }
48        { long long int ret; ret = __sync_fetch_and_or_8(vp8, v8); }
49        #if defined(__SIZEOF_INT128__)
50        { __int128 ret; ret = __sync_fetch_and_or(vp16, v16); }
51        { __int128 ret; ret = __sync_fetch_and_or_16(vp16, v16); }
52        #endif
53
54        { char ret; ret = __sync_fetch_and_and(vp1, v1); }
55        { char ret; ret = __sync_fetch_and_and_1(vp1, v1); }
56        { short ret; ret = __sync_fetch_and_and(vp2, v2); }
57        { short ret; ret = __sync_fetch_and_and_2(vp2, v2); }
58        { int ret; ret = __sync_fetch_and_and(vp4, v4); }
59        { int ret; ret = __sync_fetch_and_and_4(vp4, v4); }
60        { long long int ret; ret = __sync_fetch_and_and(vp8, v8); }
61        { long long int ret; ret = __sync_fetch_and_and_8(vp8, v8); }
62        #if defined(__SIZEOF_INT128__)
63        { __int128 ret; ret = __sync_fetch_and_and(vp16, v16); }
64        { __int128 ret; ret = __sync_fetch_and_and_16(vp16, v16); }
65        #endif
66
67        { char ret; ret = __sync_fetch_and_xor(vp1, v1); }
68        { char ret; ret = __sync_fetch_and_xor_1(vp1, v1); }
69        { short ret; ret = __sync_fetch_and_xor(vp2, v2); }
70        { short ret; ret = __sync_fetch_and_xor_2(vp2, v2); }
71        { int ret; ret = __sync_fetch_and_xor(vp4, v4); }
72        { int ret; ret = __sync_fetch_and_xor_4(vp4, v4); }
73        { long long int ret; ret = __sync_fetch_and_xor(vp8, v8); }
74        { long long int ret; ret = __sync_fetch_and_xor_8(vp8, v8); }
75        #if defined(__SIZEOF_INT128__)
76        { __int128 ret; ret = __sync_fetch_and_xor(vp16, v16); }
77        { __int128 ret; ret = __sync_fetch_and_xor_16(vp16, v16); }
78        #endif
79
80        { char ret; ret = __sync_fetch_and_nand(vp1, v1); }
81        { char ret; ret = __sync_fetch_and_nand_1(vp1, v1); }
82        { short ret; ret = __sync_fetch_and_nand(vp2, v2); }
83        { short ret; ret = __sync_fetch_and_nand_2(vp2, v2); }
84        { int ret; ret = __sync_fetch_and_nand(vp4, v4); }
85        { int ret; ret = __sync_fetch_and_nand_4(vp4, v4); }
86        { long long int ret; ret = __sync_fetch_and_nand(vp8, v8); }
87        { long long int ret; ret = __sync_fetch_and_nand_8(vp8, v8); }
88        #if defined(__SIZEOF_INT128__)
89        { __int128 ret; ret = __sync_fetch_and_nand(vp16, v16); }
90        { __int128 ret; ret = __sync_fetch_and_nand_16(vp16, v16); }
91        #endif
92
93        { char ret; ret = __sync_add_and_fetch(vp1, v1); }
94        { char ret; ret = __sync_add_and_fetch_1(vp1, v1); }
95        { short ret; ret = __sync_add_and_fetch(vp2, v2); }
96        { short ret; ret = __sync_add_and_fetch_2(vp2, v2); }
97        { int ret; ret = __sync_add_and_fetch(vp4, v4); }
98        { int ret; ret = __sync_add_and_fetch_4(vp4, v4); }
99        { long long int ret; ret = __sync_add_and_fetch(vp8, v8); }
100        { long long int ret; ret = __sync_add_and_fetch_8(vp8, v8); }
101        #if defined(__SIZEOF_INT128__)
102        { __int128 ret; ret = __sync_add_and_fetch(vp16, v16); }
103        { __int128 ret; ret = __sync_add_and_fetch_16(vp16, v16); }
104        #endif
105
106        { char ret; ret = __sync_sub_and_fetch(vp1, v1); }
107        { char ret; ret = __sync_sub_and_fetch_1(vp1, v1); }
108        { short ret; ret = __sync_sub_and_fetch(vp2, v2); }
109        { short ret; ret = __sync_sub_and_fetch_2(vp2, v2); }
110        { int ret; ret = __sync_sub_and_fetch(vp4, v4); }
111        { int ret; ret = __sync_sub_and_fetch_4(vp4, v4); }
112        { long long int ret; ret = __sync_sub_and_fetch(vp8, v8); }
113        { long long int ret; ret = __sync_sub_and_fetch_8(vp8, v8); }
114        #if defined(__SIZEOF_INT128__)
115        { __int128 ret; ret = __sync_sub_and_fetch(vp16, v16); }
116        { __int128 ret; ret = __sync_sub_and_fetch_16(vp16, v16); }
117        #endif
118
119        { char ret; ret = __sync_or_and_fetch(vp1, v1); }
120        { char ret; ret = __sync_or_and_fetch_1(vp1, v1); }
121        { short ret; ret = __sync_or_and_fetch(vp2, v2); }
122        { short ret; ret = __sync_or_and_fetch_2(vp2, v2); }
123        { int ret; ret = __sync_or_and_fetch(vp4, v4); }
124        { int ret; ret = __sync_or_and_fetch_4(vp4, v4); }
125        { long long int ret; ret = __sync_or_and_fetch(vp8, v8); }
126        { long long int ret; ret = __sync_or_and_fetch_8(vp8, v8); }
127        #if defined(__SIZEOF_INT128__)
128        { __int128 ret; ret = __sync_or_and_fetch(vp16, v16); }
129        { __int128 ret; ret = __sync_or_and_fetch_16(vp16, v16); }
130        #endif
131
132        { char ret; ret = __sync_and_and_fetch(vp1, v1); }
133        { char ret; ret = __sync_and_and_fetch_1(vp1, v1); }
134        { short ret; ret = __sync_and_and_fetch(vp2, v2); }
135        { short ret; ret = __sync_and_and_fetch_2(vp2, v2); }
136        { int ret; ret = __sync_and_and_fetch(vp4, v4); }
137        { int ret; ret = __sync_and_and_fetch_4(vp4, v4); }
138        { long long int ret; ret = __sync_and_and_fetch(vp8, v8); }
139        { long long int ret; ret = __sync_and_and_fetch_8(vp8, v8); }
140        #if defined(__SIZEOF_INT128__)
141        { __int128 ret; ret = __sync_and_and_fetch(vp16, v16); }
142        { __int128 ret; ret = __sync_and_and_fetch_16(vp16, v16); }
143        #endif
144
145        { char ret; ret = __sync_xor_and_fetch(vp1, v1); }
146        { char ret; ret = __sync_xor_and_fetch_1(vp1, v1); }
147        { short ret; ret = __sync_xor_and_fetch(vp2, v2); }
148        { short ret; ret = __sync_xor_and_fetch_2(vp2, v2); }
149        { int ret; ret = __sync_xor_and_fetch(vp4, v4); }
150        { int ret; ret = __sync_xor_and_fetch_4(vp4, v4); }
151        { long long int ret; ret = __sync_xor_and_fetch(vp8, v8); }
152        { long long int ret; ret = __sync_xor_and_fetch_8(vp8, v8); }
153        #if defined(__SIZEOF_INT128__)
154        { __int128 ret; ret = __sync_xor_and_fetch(vp16, v16); }
155        { __int128 ret; ret = __sync_xor_and_fetch_16(vp16, v16); }
156        #endif
157
158        { char ret; ret = __sync_nand_and_fetch(vp1, v1); }
159        { char ret; ret = __sync_nand_and_fetch_1(vp1, v1); }
160        { short ret; ret = __sync_nand_and_fetch(vp2, v2); }
161        { short ret; ret = __sync_nand_and_fetch_2(vp2, v2); }
162        { int ret; ret = __sync_nand_and_fetch(vp4, v4); }
163        { int ret; ret = __sync_nand_and_fetch_4(vp4, v4); }
164        { long long int ret; ret = __sync_nand_and_fetch(vp8, v8); }
165        { long long int ret; ret = __sync_nand_and_fetch_8(vp8, v8); }
166        #if defined(__SIZEOF_INT128__)
167        { __int128 ret; ret = __sync_nand_and_fetch(vp16, v16); }
168        { __int128 ret; ret = __sync_nand_and_fetch_16(vp16, v16); }
169        #endif
170
171        { _Bool ret; ret = __sync_bool_compare_and_swap(vp1, v1, v1); }
172        { _Bool ret; ret = __sync_bool_compare_and_swap_1(vp1, v1, v1); }
173        { _Bool ret; ret = __sync_bool_compare_and_swap(vp2, v2, v2); }
174        { _Bool ret; ret = __sync_bool_compare_and_swap_2(vp2, v2, v2); }
175        { _Bool ret; ret = __sync_bool_compare_and_swap(vp4, v4, v4); }
176        { _Bool ret; ret = __sync_bool_compare_and_swap_4(vp4, v4, v4); }
177        { _Bool ret; ret = __sync_bool_compare_and_swap(vp8, v8, v8); }
178        { _Bool ret; ret = __sync_bool_compare_and_swap_8(vp8, v8, v8); }
179        #if defined(__SIZEOF_INT128__)
180        { _Bool ret; ret = __sync_bool_compare_and_swap(vp16, v16, v16); }
181        { _Bool ret; ret = __sync_bool_compare_and_swap_16(vp16, v16,v16); }
182        #endif
183        { _Bool ret; ret = __sync_bool_compare_and_swap(vpp, vp, vp); }
184
185        { char ret; ret = __sync_val_compare_and_swap(vp1, v1, v1); }
186        { char ret; ret = __sync_val_compare_and_swap_1(vp1, v1, v1); }
187        { short ret; ret = __sync_val_compare_and_swap(vp2, v2, v2); }
188        { short ret; ret = __sync_val_compare_and_swap_2(vp2, v2, v2); }
189        { int ret; ret = __sync_val_compare_and_swap(vp4, v4, v4); }
190        { int ret; ret = __sync_val_compare_and_swap_4(vp4, v4, v4); }
191        { long long int ret; ret = __sync_val_compare_and_swap(vp8, v8, v8); }
192        { long long int ret; ret = __sync_val_compare_and_swap_8(vp8, v8, v8); }
193        #if defined(__SIZEOF_INT128__)
194        { __int128 ret; ret = __sync_val_compare_and_swap(vp16, v16, v16); }
195        { __int128 ret; ret = __sync_val_compare_and_swap_16(vp16, v16,v16); }
196        #endif
197        { struct type * ret; ret = __sync_val_compare_and_swap(vpp, vp, vp); }
198
199
200        { char ret; ret = __sync_lock_test_and_set(vp1, v1); }
201        { char ret; ret = __sync_lock_test_and_set_1(vp1, v1); }
202        { short ret; ret = __sync_lock_test_and_set(vp2, v2); }
203        { short ret; ret = __sync_lock_test_and_set_2(vp2, v2); }
204        { int ret; ret = __sync_lock_test_and_set(vp4, v4); }
205        { int ret; ret = __sync_lock_test_and_set_4(vp4, v4); }
206        { long long int ret; ret = __sync_lock_test_and_set(vp8, v8); }
207        { long long int ret; ret = __sync_lock_test_and_set_8(vp8, v8); }
208        #if defined(__SIZEOF_INT128__)
209        { __int128 ret; ret = __sync_lock_test_and_set(vp16, v16); }
210        { __int128 ret; ret = __sync_lock_test_and_set_16(vp16, v16); }
211        #endif
212
213        { __sync_lock_release(vp1); }
214        { __sync_lock_release_1(vp1); }
215        { __sync_lock_release(vp2); }
216        { __sync_lock_release_2(vp2); }
217        { __sync_lock_release(vp4); }
218        { __sync_lock_release_4(vp4); }
219        { __sync_lock_release(vp8); }
220        { __sync_lock_release_8(vp8); }
221        #if defined(__SIZEOF_INT128__)
222        { __sync_lock_release(vp16); }
223        { __sync_lock_release_16(vp16); }
224        #endif
225
226        { __sync_synchronize(); }
227
228
229
230
231        { _Bool ret; ret = __atomic_test_and_set(vpB, vB); }
232        { _Bool ret; ret = __atomic_test_and_set(vp1, v1); }
233        { __atomic_clear(vpB, vB); }
234        { __atomic_clear(vp1, v1); }
235
236        { char ret; ret = __atomic_exchange_n(vp1, v1, __ATOMIC_SEQ_CST); }
237        { char ret; ret = __atomic_exchange_1(vp1, v1, __ATOMIC_SEQ_CST); }
238        { char ret; __atomic_exchange(vp1, &v1, &ret, __ATOMIC_SEQ_CST); }
239        { short ret; ret = __atomic_exchange_n(vp2, v2, __ATOMIC_SEQ_CST); }
240        { short ret; ret = __atomic_exchange_2(vp2, v2, __ATOMIC_SEQ_CST); }
241        { short ret; __atomic_exchange(vp2, &v2, &ret, __ATOMIC_SEQ_CST); }
242        { int ret; ret = __atomic_exchange_n(vp4, v4, __ATOMIC_SEQ_CST); }
243        { int ret; ret = __atomic_exchange_4(vp4, v4, __ATOMIC_SEQ_CST); }
244        { int ret; __atomic_exchange(vp4, &v4, &ret, __ATOMIC_SEQ_CST); }
245        { long long int ret; ret = __atomic_exchange_n(vp8, v8, __ATOMIC_SEQ_CST); }
246        { long long int ret; ret = __atomic_exchange_8(vp8, v8, __ATOMIC_SEQ_CST); }
247        { long long int ret; __atomic_exchange(vp8, &v8, &ret, __ATOMIC_SEQ_CST); }
248        #if defined(__SIZEOF_INT128__)
249        { __int128 ret; ret = __atomic_exchange_n(vp16, v16, __ATOMIC_SEQ_CST); }
250        { __int128 ret; ret = __atomic_exchange_16(vp16, v16, __ATOMIC_SEQ_CST); }
251        { __int128 ret; __atomic_exchange(vp16, &v16, &ret, __ATOMIC_SEQ_CST); }
252        #endif
253        { struct type * ret; ret = __atomic_exchange_n(vpp, vp, __ATOMIC_SEQ_CST); }
254        { struct type * ret; __atomic_exchange(vpp, &vp, &ret, __ATOMIC_SEQ_CST); }
255
256        { char ret; ret = __atomic_load_n(vp1, __ATOMIC_SEQ_CST); }
257        { char ret; ret = __atomic_load_1(vp1, __ATOMIC_SEQ_CST); }
258        { char ret; __atomic_load(vp1, &ret, __ATOMIC_SEQ_CST); }
259        { short ret; ret = __atomic_load_n(vp2, __ATOMIC_SEQ_CST); }
260        { short ret; ret = __atomic_load_2(vp2, __ATOMIC_SEQ_CST); }
261        { short ret; __atomic_load(vp2, &ret, __ATOMIC_SEQ_CST); }
262        { int ret; ret = __atomic_load_n(vp4, __ATOMIC_SEQ_CST); }
263        { int ret; ret = __atomic_load_4(vp4, __ATOMIC_SEQ_CST); }
264        { int ret; __atomic_load(vp4, &ret, __ATOMIC_SEQ_CST); }
265        { long long int ret; ret = __atomic_load_n(vp8, __ATOMIC_SEQ_CST); }
266        { long long int ret; ret = __atomic_load_8(vp8, __ATOMIC_SEQ_CST); }
267        { long long int ret; __atomic_load(vp8, &ret, __ATOMIC_SEQ_CST); }
268        #if defined(__SIZEOF_INT128__)
269        { __int128 ret; ret = __atomic_load_n(vp16, __ATOMIC_SEQ_CST); }
270        { __int128 ret; ret = __atomic_load_16(vp16, __ATOMIC_SEQ_CST); }
271        { __int128 ret; __atomic_load(vp16, &ret, __ATOMIC_SEQ_CST); }
272        #endif
273        { struct type * ret; ret = __atomic_load_n(vpp, __ATOMIC_SEQ_CST); }
274        { struct type * ret; __atomic_load(vpp, &ret, __ATOMIC_SEQ_CST); }
275
276        { _Bool ret; ret = __atomic_compare_exchange_n(vp1, rp1, v1, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
277        { _Bool ret; ret = __atomic_compare_exchange_1(vp1, rp1, v1, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
278        { _Bool ret; ret = __atomic_compare_exchange(vp1, rp1, &v1, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
279        { _Bool ret; ret = __atomic_compare_exchange_n(vp2, rp2, v2, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
280        { _Bool ret; ret = __atomic_compare_exchange_2(vp2, rp2, v2, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
281        { _Bool ret; ret = __atomic_compare_exchange(vp2, rp2, &v2, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
282        { _Bool ret; ret = __atomic_compare_exchange_n(vp4, rp4, v4, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
283        { _Bool ret; ret = __atomic_compare_exchange_4(vp4, rp4, v4, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
284        { _Bool ret; ret = __atomic_compare_exchange(vp4, rp4, &v4, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
285        { _Bool ret; ret = __atomic_compare_exchange_n(vp8, rp8, v8, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
286        { _Bool ret; ret = __atomic_compare_exchange_8(vp8, rp8, v8, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
287        { _Bool ret; ret = __atomic_compare_exchange(vp8, rp8, &v8, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
288        #if defined(__SIZEOF_INT128__)
289        { _Bool ret; ret = __atomic_compare_exchange_n(vp16, rp16, v16, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
290        { _Bool ret; ret = __atomic_compare_exchange_16(vp16, rp16, v16, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
291        { _Bool ret; ret = __atomic_compare_exchange(vp16, rp16, &v16, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
292        #endif
293        { _Bool ret; ret = __atomic_compare_exchange_n(vpp, rpp, vp, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
294        { _Bool ret; ret = __atomic_compare_exchange(vpp, rpp, &vp, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
295
296        { __atomic_store_n(vp1, v1, __ATOMIC_SEQ_CST); }
297        { __atomic_store_1(vp1, v1, __ATOMIC_SEQ_CST); }
298        { __atomic_store(vp1, &v1, __ATOMIC_SEQ_CST); }
299        { __atomic_store_n(vp2, v2, __ATOMIC_SEQ_CST); }
300        { __atomic_store_2(vp2, v2, __ATOMIC_SEQ_CST); }
301        { __atomic_store(vp2, &v2, __ATOMIC_SEQ_CST); }
302        { __atomic_store_n(vp4, v4, __ATOMIC_SEQ_CST); }
303        { __atomic_store_4(vp4, v4, __ATOMIC_SEQ_CST); }
304        { __atomic_store(vp4, &v4, __ATOMIC_SEQ_CST); }
305        { __atomic_store_n(vp8, v8, __ATOMIC_SEQ_CST); }
306        { __atomic_store_8(vp8, v8, __ATOMIC_SEQ_CST); }
307        { __atomic_store(vp8, &v8, __ATOMIC_SEQ_CST); }
308        #if defined(__SIZEOF_INT128__)
309        { __atomic_store_n(vp16, v16, __ATOMIC_SEQ_CST); }
310        { __atomic_store_16(vp16, v16, __ATOMIC_SEQ_CST); }
311        { __atomic_store(vp16, &v16, __ATOMIC_SEQ_CST); }
312        #endif
313        { __atomic_store_n(vpp, vp, __ATOMIC_SEQ_CST); }
314        { __atomic_store(vpp, &vp, __ATOMIC_SEQ_CST); }
315
316        { char ret; ret = __atomic_add_fetch(vp1, v1, __ATOMIC_SEQ_CST); }
317        { char ret; ret = __atomic_add_fetch_1(vp1, v1, __ATOMIC_SEQ_CST); }
318        { short ret; ret = __atomic_add_fetch(vp2, v2, __ATOMIC_SEQ_CST); }
319        { short ret; ret = __atomic_add_fetch_2(vp2, v2, __ATOMIC_SEQ_CST); }
320        { int ret; ret = __atomic_add_fetch(vp4, v4, __ATOMIC_SEQ_CST); }
321        { int ret; ret = __atomic_add_fetch_4(vp4, v4, __ATOMIC_SEQ_CST); }
322        { long long int ret; ret = __atomic_add_fetch(vp8, v8, __ATOMIC_SEQ_CST); }
323        { long long int ret; ret = __atomic_add_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); }
324        #if defined(__SIZEOF_INT128__)
325        { __int128 ret; ret = __atomic_add_fetch(vp16, v16, __ATOMIC_SEQ_CST); }
326        { __int128 ret; ret = __atomic_add_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); }
327        #endif
328
329        { char ret; ret = __atomic_sub_fetch(vp1, v1, __ATOMIC_SEQ_CST); }
330        { char ret; ret = __atomic_sub_fetch_1(vp1, v1, __ATOMIC_SEQ_CST); }
331        { short ret; ret = __atomic_sub_fetch(vp2, v2, __ATOMIC_SEQ_CST); }
332        { short ret; ret = __atomic_sub_fetch_2(vp2, v2, __ATOMIC_SEQ_CST); }
333        { int ret; ret = __atomic_sub_fetch(vp4, v4, __ATOMIC_SEQ_CST); }
334        { int ret; ret = __atomic_sub_fetch_4(vp4, v4, __ATOMIC_SEQ_CST); }
335        { long long int ret; ret = __atomic_sub_fetch(vp8, v8, __ATOMIC_SEQ_CST); }
336        { long long int ret; ret = __atomic_sub_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); }
337        #if defined(__SIZEOF_INT128__)
338        { __int128 ret; ret = __atomic_sub_fetch(vp16, v16, __ATOMIC_SEQ_CST); }
339        { __int128 ret; ret = __atomic_sub_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); }
340        #endif
341
342        { char ret; ret = __atomic_and_fetch(vp1, v1, __ATOMIC_SEQ_CST); }
343        { char ret; ret = __atomic_and_fetch_1(vp1, v1, __ATOMIC_SEQ_CST); }
344        { short ret; ret = __atomic_and_fetch(vp2, v2, __ATOMIC_SEQ_CST); }
345        { short ret; ret = __atomic_and_fetch_2(vp2, v2, __ATOMIC_SEQ_CST); }
346        { int ret; ret = __atomic_and_fetch(vp4, v4, __ATOMIC_SEQ_CST); }
347        { int ret; ret = __atomic_and_fetch_4(vp4, v4, __ATOMIC_SEQ_CST); }
348        { long long int ret; ret = __atomic_and_fetch(vp8, v8, __ATOMIC_SEQ_CST); }
349        { long long int ret; ret = __atomic_and_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); }
350        #if defined(__SIZEOF_INT128__)
351        { __int128 ret; ret = __atomic_and_fetch(vp16, v16, __ATOMIC_SEQ_CST); }
352        { __int128 ret; ret = __atomic_and_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); }
353        #endif
354
355        { char ret; ret = __atomic_nand_fetch(vp1, v1, __ATOMIC_SEQ_CST); }
356        { char ret; ret = __atomic_nand_fetch_1(vp1, v1, __ATOMIC_SEQ_CST); }
357        { short ret; ret = __atomic_nand_fetch(vp2, v2, __ATOMIC_SEQ_CST); }
358        { short ret; ret = __atomic_nand_fetch_2(vp2, v2, __ATOMIC_SEQ_CST); }
359        { int ret; ret = __atomic_nand_fetch(vp4, v4, __ATOMIC_SEQ_CST); }
360        { int ret; ret = __atomic_nand_fetch_4(vp4, v4, __ATOMIC_SEQ_CST); }
361        { long long int ret; ret = __atomic_nand_fetch(vp8, v8, __ATOMIC_SEQ_CST); }
362        { long long int ret; ret = __atomic_nand_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); }
363        #if defined(__SIZEOF_INT128__)
364        { __int128 ret; ret = __atomic_nand_fetch(vp16, v16, __ATOMIC_SEQ_CST); }
365        { __int128 ret; ret = __atomic_nand_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); }
366        #endif
367
368        { char ret; ret = __atomic_xor_fetch(vp1, v1, __ATOMIC_SEQ_CST); }
369        { char ret; ret = __atomic_xor_fetch_1(vp1, v1, __ATOMIC_SEQ_CST); }
370        { short ret; ret = __atomic_xor_fetch(vp2, v2, __ATOMIC_SEQ_CST); }
371        { short ret; ret = __atomic_xor_fetch_2(vp2, v2, __ATOMIC_SEQ_CST); }
372        { int ret; ret = __atomic_xor_fetch(vp4, v4, __ATOMIC_SEQ_CST); }
373        { int ret; ret = __atomic_xor_fetch_4(vp4, v4, __ATOMIC_SEQ_CST); }
374        { long long int ret; ret = __atomic_xor_fetch(vp8, v8, __ATOMIC_SEQ_CST); }
375        { long long int ret; ret = __atomic_xor_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); }
376        #if defined(__SIZEOF_INT128__)
377        { __int128 ret; ret = __atomic_xor_fetch(vp16, v16, __ATOMIC_SEQ_CST); }
378        { __int128 ret; ret = __atomic_xor_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); }
379        #endif
380
381        { char ret; ret = __atomic_or_fetch(vp1, v1, __ATOMIC_SEQ_CST); }
382        { char ret; ret = __atomic_or_fetch_1(vp1, v1, __ATOMIC_SEQ_CST); }
383        { short ret; ret = __atomic_or_fetch(vp2, v2, __ATOMIC_SEQ_CST); }
384        { short ret; ret = __atomic_or_fetch_2(vp2, v2, __ATOMIC_SEQ_CST); }
385        { int ret; ret = __atomic_or_fetch(vp4, v4, __ATOMIC_SEQ_CST); }
386        { int ret; ret = __atomic_or_fetch_4(vp4, v4, __ATOMIC_SEQ_CST); }
387        { long long int ret; ret = __atomic_or_fetch(vp8, v8, __ATOMIC_SEQ_CST); }
388        { long long int ret; ret = __atomic_or_fetch_8(vp8, v8, __ATOMIC_SEQ_CST); }
389        #if defined(__SIZEOF_INT128__)
390        { __int128 ret; ret = __atomic_or_fetch(vp16, v16, __ATOMIC_SEQ_CST); }
391        { __int128 ret; ret = __atomic_or_fetch_16(vp16, v16, __ATOMIC_SEQ_CST); }
392        #endif
393
394        { char ret; ret = __atomic_fetch_add(vp1, v1, __ATOMIC_SEQ_CST); }
395        { char ret; ret = __atomic_fetch_add_1(vp1, v1, __ATOMIC_SEQ_CST); }
396        { short ret; ret = __atomic_fetch_add(vp2, v2, __ATOMIC_SEQ_CST); }
397        { short ret; ret = __atomic_fetch_add_2(vp2, v2, __ATOMIC_SEQ_CST); }
398        { int ret; ret = __atomic_fetch_add(vp4, v4, __ATOMIC_SEQ_CST); }
399        { int ret; ret = __atomic_fetch_add_4(vp4, v4, __ATOMIC_SEQ_CST); }
400        { long long int ret; ret = __atomic_fetch_add(vp8, v8, __ATOMIC_SEQ_CST); }
401        { long long int ret; ret = __atomic_fetch_add_8(vp8, v8, __ATOMIC_SEQ_CST); }
402        #if defined(__SIZEOF_INT128__)
403        { __int128 ret; ret = __atomic_fetch_add(vp16, v16, __ATOMIC_SEQ_CST); }
404        { __int128 ret; ret = __atomic_fetch_add_16(vp16, v16, __ATOMIC_SEQ_CST); }
405        #endif
406
407        { char ret; ret = __atomic_fetch_sub(vp1, v1, __ATOMIC_SEQ_CST); }
408        { char ret; ret = __atomic_fetch_sub_1(vp1, v1, __ATOMIC_SEQ_CST); }
409        { short ret; ret = __atomic_fetch_sub(vp2, v2, __ATOMIC_SEQ_CST); }
410        { short ret; ret = __atomic_fetch_sub_2(vp2, v2, __ATOMIC_SEQ_CST); }
411        { int ret; ret = __atomic_fetch_sub(vp4, v4, __ATOMIC_SEQ_CST); }
412        { int ret; ret = __atomic_fetch_sub_4(vp4, v4, __ATOMIC_SEQ_CST); }
413        { long long int ret; ret = __atomic_fetch_sub(vp8, v8, __ATOMIC_SEQ_CST); }
414        { long long int ret; ret = __atomic_fetch_sub_8(vp8, v8, __ATOMIC_SEQ_CST); }
415        #if defined(__SIZEOF_INT128__)
416        { __int128 ret; ret = __atomic_fetch_sub(vp16, v16, __ATOMIC_SEQ_CST); }
417        { __int128 ret; ret = __atomic_fetch_sub_16(vp16, v16, __ATOMIC_SEQ_CST); }
418        #endif
419
420        { char ret; ret = __atomic_fetch_and(vp1, v1, __ATOMIC_SEQ_CST); }
421        { char ret; ret = __atomic_fetch_and_1(vp1, v1, __ATOMIC_SEQ_CST); }
422        { short ret; ret = __atomic_fetch_and(vp2, v2, __ATOMIC_SEQ_CST); }
423        { short ret; ret = __atomic_fetch_and_2(vp2, v2, __ATOMIC_SEQ_CST); }
424        { int ret; ret = __atomic_fetch_and(vp4, v4, __ATOMIC_SEQ_CST); }
425        { int ret; ret = __atomic_fetch_and_4(vp4, v4, __ATOMIC_SEQ_CST); }
426        { long long int ret; ret = __atomic_fetch_and(vp8, v8, __ATOMIC_SEQ_CST); }
427        { long long int ret; ret = __atomic_fetch_and_8(vp8, v8, __ATOMIC_SEQ_CST); }
428        #if defined(__SIZEOF_INT128__)
429        { __int128 ret; ret = __atomic_fetch_and(vp16, v16, __ATOMIC_SEQ_CST); }
430        { __int128 ret; ret = __atomic_fetch_and_16(vp16, v16, __ATOMIC_SEQ_CST); }
431        #endif
432
433        { char ret; ret = __atomic_fetch_nand(vp1, v1, __ATOMIC_SEQ_CST); }
434        { char ret; ret = __atomic_fetch_nand_1(vp1, v1, __ATOMIC_SEQ_CST); }
435        { short ret; ret = __atomic_fetch_nand(vp2, v2, __ATOMIC_SEQ_CST); }
436        { short ret; ret = __atomic_fetch_nand_2(vp2, v2, __ATOMIC_SEQ_CST); }
437        { int ret; ret = __atomic_fetch_nand(vp4, v4, __ATOMIC_SEQ_CST); }
438        { int ret; ret = __atomic_fetch_nand_4(vp4, v4, __ATOMIC_SEQ_CST); }
439        { long long int ret; ret = __atomic_fetch_nand(vp8, v8, __ATOMIC_SEQ_CST); }
440        { long long int ret; ret = __atomic_fetch_nand_8(vp8, v8, __ATOMIC_SEQ_CST); }
441        #if defined(__SIZEOF_INT128__)
442        { __int128 ret; ret = __atomic_fetch_nand(vp16, v16, __ATOMIC_SEQ_CST); }
443        { __int128 ret; ret = __atomic_fetch_nand_16(vp16, v16, __ATOMIC_SEQ_CST); }
444        #endif
445
446        { char ret; ret = __atomic_fetch_xor(vp1, v1, __ATOMIC_SEQ_CST); }
447        { char ret; ret = __atomic_fetch_xor_1(vp1, v1, __ATOMIC_SEQ_CST); }
448        { short ret; ret = __atomic_fetch_xor(vp2, v2, __ATOMIC_SEQ_CST); }
449        { short ret; ret = __atomic_fetch_xor_2(vp2, v2, __ATOMIC_SEQ_CST); }
450        { int ret; ret = __atomic_fetch_xor(vp4, v4, __ATOMIC_SEQ_CST); }
451        { int ret; ret = __atomic_fetch_xor_4(vp4, v4, __ATOMIC_SEQ_CST); }
452        { long long int ret; ret = __atomic_fetch_xor(vp8, v8, __ATOMIC_SEQ_CST); }
453        { long long int ret; ret = __atomic_fetch_xor_8(vp8, v8, __ATOMIC_SEQ_CST); }
454        #if defined(__SIZEOF_INT128__)
455        { __int128 ret; ret = __atomic_fetch_xor(vp16, v16, __ATOMIC_SEQ_CST); }
456        { __int128 ret; ret = __atomic_fetch_xor_16(vp16, v16, __ATOMIC_SEQ_CST); }
457        #endif
458
459        { char ret; ret = __atomic_fetch_or(vp1, v1, __ATOMIC_SEQ_CST); }
460        { char ret; ret = __atomic_fetch_or_1(vp1, v1, __ATOMIC_SEQ_CST); }
461        { short ret; ret = __atomic_fetch_or(vp2, v2, __ATOMIC_SEQ_CST); }
462        { short ret; ret = __atomic_fetch_or_2(vp2, v2, __ATOMIC_SEQ_CST); }
463        { int ret; ret = __atomic_fetch_or(vp4, v4, __ATOMIC_SEQ_CST); }
464        { int ret; ret = __atomic_fetch_or_4(vp4, v4, __ATOMIC_SEQ_CST); }
465        { long long int ret; ret = __atomic_fetch_or(vp8, v8, __ATOMIC_SEQ_CST); }
466        { long long int ret; ret = __atomic_fetch_or_8(vp8, v8, __ATOMIC_SEQ_CST); }
467        #if defined(__SIZEOF_INT128__)
468        { __int128 ret; ret = __atomic_fetch_or(vp16, v16, __ATOMIC_SEQ_CST); }
469        { __int128 ret; ret = __atomic_fetch_or_16(vp16, v16, __ATOMIC_SEQ_CST); }
470        #endif
471
472        { _Bool ret; ret = __atomic_always_lock_free(sizeof(int), vp4); }
473        { _Bool ret; ret = __atomic_is_lock_free(sizeof(int), vp4); }
474        { __atomic_thread_fence(__ATOMIC_SEQ_CST); }
475        { __atomic_signal_fence(__ATOMIC_SEQ_CST); }
476}
477
478int main() {
479        return 0;
480}
Note: See TracBrowser for help on using the repository browser.