gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_reg_1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -march=armv8-a+nolse -mno-outline-atomics" } */ |
| 3 | /* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "" } } */ |
| 4 | |
| 5 | int |
| 6 | foo (int *a) |
| 7 | { |
| 8 | int x = 3; |
| 9 | return __atomic_compare_exchange_n (a, &x, 0, 1, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE); |
| 10 | } |
| 11 | |
| 12 | /* { dg-final { scan-assembler "stxr\\tw\[0-9\]+, wzr,.*" } } */ |
| 13 | /* { dg-final { scan-assembler-not "mov\\tw\[0-9\]+, 0" } } */ |