Upgrade Boehm GC to 7.2alpha4.
[cacao.git] / src / mm / boehm-gc / libatomic_ops / tests / list_atomic.c
1 #include "atomic_ops.h" 
2 /*
3  * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
4  *
5  * This file is covered by the GNU general public license, version 2.
6  * see doc/COPYING for details.
7  */
8
9 /* This generates a compilable program.  But it is really meant to be   */
10 /* be used only with cc -E, to inspect the expensions generated by      */
11 /* primitives.                                                          */
12
13 /* The result will not link or run.                                     */
14
15 void list_atomic(void)
16 {
17   AO_T *addr, val, newval, oldval;
18   AO_TS_T tsaddr;
19   long incr;
20
21 # if defined(AO_HAVE_nop)
22     "AO_nop(): ";
23     AO_nop();
24 # else
25     "No AO_nop";
26 # endif
27 # if defined(AO_HAVE_load)
28     "AO_load(addr):";
29     AO_load(addr);
30 # else
31     "No AO_load";
32 # endif
33 # if defined(AO_HAVE_store)
34     "AO_store(addr, val):";
35     AO_store(addr, val);
36 # else
37     "No AO_store";
38 # endif
39 # if defined(AO_HAVE_test_and_set)
40     "AO_test_and_set(tsaddr):";
41     AO_test_and_set(tsaddr);
42 # else
43     "No AO_test_and_set";
44 # endif
45 # if defined(AO_HAVE_fetch_and_add1)
46     "AO_fetch_and_add1(addr):";
47     AO_fetch_and_add1(addr);
48 # else
49     "No AO_fetch_and_add1";
50 # endif
51 # if defined(AO_HAVE_fetch_and_sub1)
52     "AO_fetch_and_sub1(addr):";
53     AO_fetch_and_sub1(addr);
54 # else
55     "No AO_fetch_and_sub1";
56 # endif
57 # if defined(AO_HAVE_fetch_and_add)
58     "AO_fetch_and_add(addr, incr):";
59     AO_fetch_and_add(addr, incr);
60 # else
61     "No AO_fetch_and_add";
62 # endif
63 # if defined(AO_HAVE_compare_and_swap)
64     "AO_compare_and_swap(addr, oldval, newval):";
65     AO_compare_and_swap(addr, oldval, newval);
66 # else
67     "No AO_compare_and_swap";
68 # endif
69 }
70
71
72     
73 /*
74  * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
75  *
76  * This file is covered by the GNU general public license, version 2.
77  * see doc/COPYING for details.
78  */
79
80 /* This generates a compilable program.  But it is really meant to be   */
81 /* be used only with cc -E, to inspect the expensions generated by      */
82 /* primitives.                                                          */
83
84 /* The result will not link or run.                                     */
85
86 void list_atomic_release(void)
87 {
88   AO_T *addr, val, newval, oldval;
89   AO_TS_T tsaddr;
90   long incr;
91
92 # if defined(AO_HAVE_nop_release)
93     "AO_nop_release(): ";
94     AO_nop_release();
95 # else
96     "No AO_nop_release";
97 # endif
98 # if defined(AO_HAVE_load_release)
99     "AO_load_release(addr):";
100     AO_load_release(addr);
101 # else
102     "No AO_load_release";
103 # endif
104 # if defined(AO_HAVE_store_release)
105     "AO_store_release(addr, val):";
106     AO_store_release(addr, val);
107 # else
108     "No AO_store_release";
109 # endif
110 # if defined(AO_HAVE_test_and_set_release)
111     "AO_test_and_set_release(tsaddr):";
112     AO_test_and_set_release(tsaddr);
113 # else
114     "No AO_test_and_set_release";
115 # endif
116 # if defined(AO_HAVE_fetch_and_add1_release)
117     "AO_fetch_and_add1_release(addr):";
118     AO_fetch_and_add1_release(addr);
119 # else
120     "No AO_fetch_and_add1_release";
121 # endif
122 # if defined(AO_HAVE_fetch_and_sub1_release)
123     "AO_fetch_and_sub1_release(addr):";
124     AO_fetch_and_sub1_release(addr);
125 # else
126     "No AO_fetch_and_sub1_release";
127 # endif
128 # if defined(AO_HAVE_fetch_and_add_release)
129     "AO_fetch_and_add_release(addr, incr):";
130     AO_fetch_and_add_release(addr, incr);
131 # else
132     "No AO_fetch_and_add_release";
133 # endif
134 # if defined(AO_HAVE_compare_and_swap_release)
135     "AO_compare_and_swap_release(addr, oldval, newval):";
136     AO_compare_and_swap_release(addr, oldval, newval);
137 # else
138     "No AO_compare_and_swap_release";
139 # endif
140 }
141
142
143     
144 /*
145  * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
146  *
147  * This file is covered by the GNU general public license, version 2.
148  * see doc/COPYING for details.
149  */
150
151 /* This generates a compilable program.  But it is really meant to be   */
152 /* be used only with cc -E, to inspect the expensions generated by      */
153 /* primitives.                                                          */
154
155 /* The result will not link or run.                                     */
156
157 void list_atomic_acquire(void)
158 {
159   AO_T *addr, val, newval, oldval;
160   AO_TS_T tsaddr;
161   long incr;
162
163 # if defined(AO_HAVE_nop_acquire)
164     "AO_nop_acquire(): ";
165     AO_nop_acquire();
166 # else
167     "No AO_nop_acquire";
168 # endif
169 # if defined(AO_HAVE_load_acquire)
170     "AO_load_acquire(addr):";
171     AO_load_acquire(addr);
172 # else
173     "No AO_load_acquire";
174 # endif
175 # if defined(AO_HAVE_store_acquire)
176     "AO_store_acquire(addr, val):";
177     AO_store_acquire(addr, val);
178 # else
179     "No AO_store_acquire";
180 # endif
181 # if defined(AO_HAVE_test_and_set_acquire)
182     "AO_test_and_set_acquire(tsaddr):";
183     AO_test_and_set_acquire(tsaddr);
184 # else
185     "No AO_test_and_set_acquire";
186 # endif
187 # if defined(AO_HAVE_fetch_and_add1_acquire)
188     "AO_fetch_and_add1_acquire(addr):";
189     AO_fetch_and_add1_acquire(addr);
190 # else
191     "No AO_fetch_and_add1_acquire";
192 # endif
193 # if defined(AO_HAVE_fetch_and_sub1_acquire)
194     "AO_fetch_and_sub1_acquire(addr):";
195     AO_fetch_and_sub1_acquire(addr);
196 # else
197     "No AO_fetch_and_sub1_acquire";
198 # endif
199 # if defined(AO_HAVE_fetch_and_add_acquire)
200     "AO_fetch_and_add_acquire(addr, incr):";
201     AO_fetch_and_add_acquire(addr, incr);
202 # else
203     "No AO_fetch_and_add_acquire";
204 # endif
205 # if defined(AO_HAVE_compare_and_swap_acquire)
206     "AO_compare_and_swap_acquire(addr, oldval, newval):";
207     AO_compare_and_swap_acquire(addr, oldval, newval);
208 # else
209     "No AO_compare_and_swap_acquire";
210 # endif
211 }
212
213
214     
215 /*
216  * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
217  *
218  * This file is covered by the GNU general public license, version 2.
219  * see doc/COPYING for details.
220  */
221
222 /* This generates a compilable program.  But it is really meant to be   */
223 /* be used only with cc -E, to inspect the expensions generated by      */
224 /* primitives.                                                          */
225
226 /* The result will not link or run.                                     */
227
228 void list_atomic_read(void)
229 {
230   AO_T *addr, val, newval, oldval;
231   AO_TS_T tsaddr;
232   long incr;
233
234 # if defined(AO_HAVE_nop_read)
235     "AO_nop_read(): ";
236     AO_nop_read();
237 # else
238     "No AO_nop_read";
239 # endif
240 # if defined(AO_HAVE_load_read)
241     "AO_load_read(addr):";
242     AO_load_read(addr);
243 # else
244     "No AO_load_read";
245 # endif
246 # if defined(AO_HAVE_store_read)
247     "AO_store_read(addr, val):";
248     AO_store_read(addr, val);
249 # else
250     "No AO_store_read";
251 # endif
252 # if defined(AO_HAVE_test_and_set_read)
253     "AO_test_and_set_read(tsaddr):";
254     AO_test_and_set_read(tsaddr);
255 # else
256     "No AO_test_and_set_read";
257 # endif
258 # if defined(AO_HAVE_fetch_and_add1_read)
259     "AO_fetch_and_add1_read(addr):";
260     AO_fetch_and_add1_read(addr);
261 # else
262     "No AO_fetch_and_add1_read";
263 # endif
264 # if defined(AO_HAVE_fetch_and_sub1_read)
265     "AO_fetch_and_sub1_read(addr):";
266     AO_fetch_and_sub1_read(addr);
267 # else
268     "No AO_fetch_and_sub1_read";
269 # endif
270 # if defined(AO_HAVE_fetch_and_add_read)
271     "AO_fetch_and_add_read(addr, incr):";
272     AO_fetch_and_add_read(addr, incr);
273 # else
274     "No AO_fetch_and_add_read";
275 # endif
276 # if defined(AO_HAVE_compare_and_swap_read)
277     "AO_compare_and_swap_read(addr, oldval, newval):";
278     AO_compare_and_swap_read(addr, oldval, newval);
279 # else
280     "No AO_compare_and_swap_read";
281 # endif
282 }
283
284
285     
286 /*
287  * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
288  *
289  * This file is covered by the GNU general public license, version 2.
290  * see doc/COPYING for details.
291  */
292
293 /* This generates a compilable program.  But it is really meant to be   */
294 /* be used only with cc -E, to inspect the expensions generated by      */
295 /* primitives.                                                          */
296
297 /* The result will not link or run.                                     */
298
299 void list_atomic_write(void)
300 {
301   AO_T *addr, val, newval, oldval;
302   AO_TS_T tsaddr;
303   long incr;
304
305 # if defined(AO_HAVE_nop_write)
306     "AO_nop_write(): ";
307     AO_nop_write();
308 # else
309     "No AO_nop_write";
310 # endif
311 # if defined(AO_HAVE_load_write)
312     "AO_load_write(addr):";
313     AO_load_write(addr);
314 # else
315     "No AO_load_write";
316 # endif
317 # if defined(AO_HAVE_store_write)
318     "AO_store_write(addr, val):";
319     AO_store_write(addr, val);
320 # else
321     "No AO_store_write";
322 # endif
323 # if defined(AO_HAVE_test_and_set_write)
324     "AO_test_and_set_write(tsaddr):";
325     AO_test_and_set_write(tsaddr);
326 # else
327     "No AO_test_and_set_write";
328 # endif
329 # if defined(AO_HAVE_fetch_and_add1_write)
330     "AO_fetch_and_add1_write(addr):";
331     AO_fetch_and_add1_write(addr);
332 # else
333     "No AO_fetch_and_add1_write";
334 # endif
335 # if defined(AO_HAVE_fetch_and_sub1_write)
336     "AO_fetch_and_sub1_write(addr):";
337     AO_fetch_and_sub1_write(addr);
338 # else
339     "No AO_fetch_and_sub1_write";
340 # endif
341 # if defined(AO_HAVE_fetch_and_add_write)
342     "AO_fetch_and_add_write(addr, incr):";
343     AO_fetch_and_add_write(addr, incr);
344 # else
345     "No AO_fetch_and_add_write";
346 # endif
347 # if defined(AO_HAVE_compare_and_swap_write)
348     "AO_compare_and_swap_write(addr, oldval, newval):";
349     AO_compare_and_swap_write(addr, oldval, newval);
350 # else
351     "No AO_compare_and_swap_write";
352 # endif
353 }
354
355
356     
357 /*
358  * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
359  *
360  * This file is covered by the GNU general public license, version 2.
361  * see doc/COPYING for details.
362  */
363
364 /* This generates a compilable program.  But it is really meant to be   */
365 /* be used only with cc -E, to inspect the expensions generated by      */
366 /* primitives.                                                          */
367
368 /* The result will not link or run.                                     */
369
370 void list_atomic_full(void)
371 {
372   AO_T *addr, val, newval, oldval;
373   AO_TS_T tsaddr;
374   long incr;
375
376 # if defined(AO_HAVE_nop_full)
377     "AO_nop_full(): ";
378     AO_nop_full();
379 # else
380     "No AO_nop_full";
381 # endif
382 # if defined(AO_HAVE_load_full)
383     "AO_load_full(addr):";
384     AO_load_full(addr);
385 # else
386     "No AO_load_full";
387 # endif
388 # if defined(AO_HAVE_store_full)
389     "AO_store_full(addr, val):";
390     AO_store_full(addr, val);
391 # else
392     "No AO_store_full";
393 # endif
394 # if defined(AO_HAVE_test_and_set_full)
395     "AO_test_and_set_full(tsaddr):";
396     AO_test_and_set_full(tsaddr);
397 # else
398     "No AO_test_and_set_full";
399 # endif
400 # if defined(AO_HAVE_fetch_and_add1_full)
401     "AO_fetch_and_add1_full(addr):";
402     AO_fetch_and_add1_full(addr);
403 # else
404     "No AO_fetch_and_add1_full";
405 # endif
406 # if defined(AO_HAVE_fetch_and_sub1_full)
407     "AO_fetch_and_sub1_full(addr):";
408     AO_fetch_and_sub1_full(addr);
409 # else
410     "No AO_fetch_and_sub1_full";
411 # endif
412 # if defined(AO_HAVE_fetch_and_add_full)
413     "AO_fetch_and_add_full(addr, incr):";
414     AO_fetch_and_add_full(addr, incr);
415 # else
416     "No AO_fetch_and_add_full";
417 # endif
418 # if defined(AO_HAVE_compare_and_swap_full)
419     "AO_compare_and_swap_full(addr, oldval, newval):";
420     AO_compare_and_swap_full(addr, oldval, newval);
421 # else
422     "No AO_compare_and_swap_full";
423 # endif
424 }
425
426
427     
428 /*
429  * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
430  *
431  * This file is covered by the GNU general public license, version 2.
432  * see doc/COPYING for details.
433  */
434
435 /* This generates a compilable program.  But it is really meant to be   */
436 /* be used only with cc -E, to inspect the expensions generated by      */
437 /* primitives.                                                          */
438
439 /* The result will not link or run.                                     */
440
441 void list_atomic_release_write(void)
442 {
443   AO_T *addr, val, newval, oldval;
444   AO_TS_T tsaddr;
445   long incr;
446
447 # if defined(AO_HAVE_nop_release_write)
448     "AO_nop_release_write(): ";
449     AO_nop_release_write();
450 # else
451     "No AO_nop_release_write";
452 # endif
453 # if defined(AO_HAVE_load_release_write)
454     "AO_load_release_write(addr):";
455     AO_load_release_write(addr);
456 # else
457     "No AO_load_release_write";
458 # endif
459 # if defined(AO_HAVE_store_release_write)
460     "AO_store_release_write(addr, val):";
461     AO_store_release_write(addr, val);
462 # else
463     "No AO_store_release_write";
464 # endif
465 # if defined(AO_HAVE_test_and_set_release_write)
466     "AO_test_and_set_release_write(tsaddr):";
467     AO_test_and_set_release_write(tsaddr);
468 # else
469     "No AO_test_and_set_release_write";
470 # endif
471 # if defined(AO_HAVE_fetch_and_add1_release_write)
472     "AO_fetch_and_add1_release_write(addr):";
473     AO_fetch_and_add1_release_write(addr);
474 # else
475     "No AO_fetch_and_add1_release_write";
476 # endif
477 # if defined(AO_HAVE_fetch_and_sub1_release_write)
478     "AO_fetch_and_sub1_release_write(addr):";
479     AO_fetch_and_sub1_release_write(addr);
480 # else
481     "No AO_fetch_and_sub1_release_write";
482 # endif
483 # if defined(AO_HAVE_fetch_and_add_release_write)
484     "AO_fetch_and_add_release_write(addr, incr):";
485     AO_fetch_and_add_release_write(addr, incr);
486 # else
487     "No AO_fetch_and_add_release_write";
488 # endif
489 # if defined(AO_HAVE_compare_and_swap_release_write)
490     "AO_compare_and_swap_release_write(addr, oldval, newval):";
491     AO_compare_and_swap_release_write(addr, oldval, newval);
492 # else
493     "No AO_compare_and_swap_release_write";
494 # endif
495 }
496
497
498     
499 /*
500  * Copyright (c) 2003 by Hewlett-Packard Company.  All rights reserved.
501  *
502  * This file is covered by the GNU general public license, version 2.
503  * see doc/COPYING for details.
504  */
505
506 /* This generates a compilable program.  But it is really meant to be   */
507 /* be used only with cc -E, to inspect the expensions generated by      */
508 /* primitives.                                                          */
509
510 /* The result will not link or run.                                     */
511
512 void list_atomic_acquire_read(void)
513 {
514   AO_T *addr, val, newval, oldval;
515   AO_TS_T tsaddr;
516   long incr;
517
518 # if defined(AO_HAVE_nop_acquire_read)
519     "AO_nop_acquire_read(): ";
520     AO_nop_acquire_read();
521 # else
522     "No AO_nop_acquire_read";
523 # endif
524 # if defined(AO_HAVE_load_acquire_read)
525     "AO_load_acquire_read(addr):";
526     AO_load_acquire_read(addr);
527 # else
528     "No AO_load_acquire_read";
529 # endif
530 # if defined(AO_HAVE_store_acquire_read)
531     "AO_store_acquire_read(addr, val):";
532     AO_store_acquire_read(addr, val);
533 # else
534     "No AO_store_acquire_read";
535 # endif
536 # if defined(AO_HAVE_test_and_set_acquire_read)
537     "AO_test_and_set_acquire_read(tsaddr):";
538     AO_test_and_set_acquire_read(tsaddr);
539 # else
540     "No AO_test_and_set_acquire_read";
541 # endif
542 # if defined(AO_HAVE_fetch_and_add1_acquire_read)
543     "AO_fetch_and_add1_acquire_read(addr):";
544     AO_fetch_and_add1_acquire_read(addr);
545 # else
546     "No AO_fetch_and_add1_acquire_read";
547 # endif
548 # if defined(AO_HAVE_fetch_and_sub1_acquire_read)
549     "AO_fetch_and_sub1_acquire_read(addr):";
550     AO_fetch_and_sub1_acquire_read(addr);
551 # else
552     "No AO_fetch_and_sub1_acquire_read";
553 # endif
554 # if defined(AO_HAVE_fetch_and_add_acquire_read)
555     "AO_fetch_and_add_acquire_read(addr, incr):";
556     AO_fetch_and_add_acquire_read(addr, incr);
557 # else
558     "No AO_fetch_and_add_acquire_read";
559 # endif
560 # if defined(AO_HAVE_compare_and_swap_acquire_read)
561     "AO_compare_and_swap_acquire_read(addr, oldval, newval):";
562     AO_compare_and_swap_acquire_read(addr, oldval, newval);
563 # else
564     "No AO_compare_and_swap_acquire_read";
565 # endif
566 }
567
568
569