1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
7 atomic_fetch_add_ACQ_REL (int a)
9 return __atomic_fetch_add (&v, a, __ATOMIC_ACQ_REL);
13 atomic_fetch_sub_ACQ_REL (int a)
15 return __atomic_fetch_sub (&v, a, __ATOMIC_ACQ_REL);
19 atomic_fetch_and_ACQ_REL (int a)
21 return __atomic_fetch_and (&v, a, __ATOMIC_ACQ_REL);
25 atomic_fetch_nand_ACQ_REL (int a)
27 return __atomic_fetch_nand (&v, a, __ATOMIC_ACQ_REL);
31 atomic_fetch_xor_ACQ_REL (int a)
33 return __atomic_fetch_xor (&v, a, __ATOMIC_ACQ_REL);
37 atomic_fetch_or_ACQ_REL (int a)
39 return __atomic_fetch_or (&v, a, __ATOMIC_ACQ_REL);
42 /* { dg-final { scan-assembler-times "ldaxr\tw\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
43 /* { dg-final { scan-assembler-times "stlxr\tw\[0-9\]+, w\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */