1 /* Supply a set of generic atomic functions to test the compiler make the
3 /* { dg-do compile } */
4 /* { dg-options "-w" } */
6 /* Test that the generic builtins make calls as expected. This file provides
7 the exact entry points the test file will require. All these routines
8 simply set the first parameter to 1, and the caller will test for that. */
16 __atomic_exchange_1 (char *p, char t, int i)
22 __atomic_load_2 (short *p, int i)
28 __atomic_store_1 (char *p, char v, int i)
33 int __atomic_compare_exchange_2 (short *p, short *a, short b, int y, int z)
35 /* Fail if the memory models aren't correct as that will indicate the external
36 call has failed to remove the weak/strong parameter as required by the
38 if (y != __ATOMIC_SEQ_CST || z != __ATOMIC_ACQUIRE)
44 char __atomic_fetch_add_1 (char *p, char v, int i)
49 short __atomic_fetch_add_2 (short *p, short v, int i)
54 /* Really perform a NAND. PR51040 showed incorrect calculation of a
55 non-inlined fetch_nand. */
57 __atomic_fetch_nand_1 (unsigned char *p, unsigned char v, int i)
67 int __atomic_is_lock_free (int i, void *p)