diff options
author | Matthew Wahab <matthew.wahab@arm.com> | 2015-06-29 16:12:12 +0000 |
---|---|---|
committer | Matthew Wahab <mwahab@gcc.gnu.org> | 2015-06-29 16:12:12 +0000 |
commit | 77f3f9bf9eaec6f7095f711024d76a342655863b (patch) | |
tree | da578e136066f910ead6c3a2bffd277f15c150ab /gcc | |
parent | a96297a28065d27559d17ebe1e0eda308a05e965 (diff) | |
download | gcc-77f3f9bf9eaec6f7095f711024d76a342655863b.zip gcc-77f3f9bf9eaec6f7095f711024d76a342655863b.tar.gz gcc-77f3f9bf9eaec6f7095f711024d76a342655863b.tar.bz2 |
re PR target/65697 (__atomic memory barriers not strong enough for __sync builtins)
2015-06-29 Matthew Wahab <matthew.wahab@arm.com>
PR target/65697
* gcc.target/arm/armv-sync-comp-swap.c: New.
* gcc.target/arm/armv-sync-op-acquire.c: New.
* gcc.target/arm/armv-sync-op-full.c: New.
* gcc.target/arm/armv-sync-op-release.c: New.
From-SVN: r225134
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/arm/armv8-sync-comp-swap.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/arm/armv8-sync-op-acquire.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/arm/armv8-sync-op-full.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/arm/armv8-sync-op-release.c | 8 |
5 files changed, 46 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6ecc469..fd533ab 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,14 @@ 2015-06-29 Matthew Wahab <matthew.wahab@arm.com> PR target/65697 + * gcc.target/arm/armv-sync-comp-swap.c: New. + * gcc.target/arm/armv-sync-op-acquire.c: New. + * gcc.target/arm/armv-sync-op-full.c: New. + * gcc.target/arm/armv-sync-op-release.c: New. + +2015-06-29 Matthew Wahab <matthew.wahab@arm.com> + + PR target/65697 * config/armc/arm.c (arm_split_compare_and_swap): For ARMv8, replace an initial acquire barrier with final barrier. diff --git a/gcc/testsuite/gcc.target/arm/armv8-sync-comp-swap.c b/gcc/testsuite/gcc.target/arm/armv8-sync-comp-swap.c new file mode 100644 index 0000000..f96c81a --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/armv8-sync-comp-swap.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { do-require-effective-target arm_arch_v8a_ok } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_arch_v8a } */ + +#include "../aarch64/sync-comp-swap.x" + +/* { dg-final { scan-assembler-times "ldrex" 2 } } */ +/* { dg-final { scan-assembler-times "stlex" 2 } } */ +/* { dg-final { scan-assembler-times "dmb" 2 } } */ diff --git a/gcc/testsuite/gcc.target/arm/armv8-sync-op-acquire.c b/gcc/testsuite/gcc.target/arm/armv8-sync-op-acquire.c new file mode 100644 index 0000000..8d6659b --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/armv8-sync-op-acquire.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { do-require-effective-target arm_arch_v8a_ok } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_arch_v8a } */ + +#include "../aarch64/sync-op-acquire.x" + +/* { dg-final { scan-assembler-times "ldrex" 1 } } */ +/* { dg-final { scan-assembler-times "stlex" 1 } } */ +/* { dg-final { scan-assembler-times "dmb" 1 } } */ diff --git a/gcc/testsuite/gcc.target/arm/armv8-sync-op-full.c b/gcc/testsuite/gcc.target/arm/armv8-sync-op-full.c new file mode 100644 index 0000000..a5ad3bd --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/armv8-sync-op-full.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { do-require-effective-target arm_arch_v8a_ok } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_arch_v8a } */ + +#include "../aarch64/sync-op-full.x" + +/* { dg-final { scan-assembler-times "ldrex" 12 } } */ +/* { dg-final { scan-assembler-times "stlex" 12 } } */ +/* { dg-final { scan-assembler-times "dmb" 12 } } */ diff --git a/gcc/testsuite/gcc.target/arm/armv8-sync-op-release.c b/gcc/testsuite/gcc.target/arm/armv8-sync-op-release.c new file mode 100644 index 0000000..0d3be7b --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/armv8-sync-op-release.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { do-require-effective-target arm_arch_v8a_ok } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_arch_v8a } */ + +#include "../aarch64/sync-op-release.x" + +/* { dg-final { scan-assembler-times "stl" 1 } } */ |