1 /* Check that the basic library call variant is sane; no other calls, no
2 checks compares or branches. */
3 /* { dg-do compile } */
4 /* { dg-options "-O2 -munaligned-atomic-may-use-library" } */
5 /* { dg-final { scan-assembler-not "\tdi" } } */
6 /* { dg-final { scan-assembler-not "\tbtstq" } } */
7 /* { dg-final { scan-assembler-not "\tand" } } */
8 /* { dg-final { scan-assembler-not "\tclearf" } } */
9 /* { dg-final { scan-assembler-not "\tmove.d" } } */
10 /* { dg-final { scan-assembler-not "\tcmp" } } */
11 /* { dg-final { scan-assembler-not "\tb\[^s\]" } } */
12 /* { dg-final { scan-assembler-times "\t\[JjBb\]sr" 1 } } */
18 type
svcsw (type
*ptr
, type oldval
, type newval
)
20 return __sync_val_compare_and_swap (ptr
, oldval
, newval
);