diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.x')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.x | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.x b/gcc-4.9/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.x new file mode 100644 index 000000000..c6b0792ba --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.x @@ -0,0 +1,37 @@ +int v = 0; + +int +atomic_fetch_add_CONSUME (int a) +{ + return __atomic_fetch_add (&v, a, __ATOMIC_CONSUME); +} + +int +atomic_fetch_sub_CONSUME (int a) +{ + return __atomic_fetch_sub (&v, a, __ATOMIC_CONSUME); +} + +int +atomic_fetch_and_CONSUME (int a) +{ + return __atomic_fetch_and (&v, a, __ATOMIC_CONSUME); +} + +int +atomic_fetch_nand_CONSUME (int a) +{ + return __atomic_fetch_nand (&v, a, __ATOMIC_CONSUME); +} + +int +atomic_fetch_xor_CONSUME (int a) +{ + return __atomic_fetch_xor (&v, a, __ATOMIC_CONSUME); +} + +int +atomic_fetch_or_CONSUME (int a) +{ + return __atomic_fetch_or (&v, a, __ATOMIC_CONSUME); +} |