re PR target/65697 (__atomic memory barriers not strong enough for __sync builtins)
authorMatthew Wahab <matthew.wahab@arm.com>
Mon, 29 Jun 2015 16:12:12 +0000 (16:12 +0000)
committerMatthew Wahab <mwahab@gcc.gnu.org>
Mon, 29 Jun 2015 16:12:12 +0000 (16:12 +0000)
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

gcc/ChangeLog
gcc/testsuite/gcc.target/arm/armv8-sync-comp-swap.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/armv8-sync-op-acquire.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/armv8-sync-op-full.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/armv8-sync-op-release.c [new file with mode: 0644]

index 6ecc469a8141ef272676616199eedaffdce0c102..fd533ab464f7ec2e1b73c587f2137d72bab3c5ad 100644 (file)
@@ -1,3 +1,11 @@
+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
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 (file)
index 0000000..f96c81a
--- /dev/null
@@ -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 (file)
index 0000000..8d6659b
--- /dev/null
@@ -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 (file)
index 0000000..a5ad3bd
--- /dev/null
@@ -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 (file)
index 0000000..0d3be7b
--- /dev/null
@@ -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 } } */