arm.h (TARGET_HAVE_LDACQ): Enable for ARMv8-M Mainline.
authorThomas Preud'homme <thomas.preudhomme@arm.com>
Thu, 14 Jul 2016 17:21:21 +0000 (17:21 +0000)
committerThomas Preud'homme <thopre01@gcc.gnu.org>
Thu, 14 Jul 2016 17:21:21 +0000 (17:21 +0000)
2016-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config/arm/arm.h (TARGET_HAVE_LDACQ): Enable for ARMv8-M Mainline.
    (TARGET_HAVE_LDACQD): New macro.
    * config/arm/sync.md (atomic_loaddi): Use TARGET_HAVE_LDACQD rather
    than TARGET_HAVE_LDACQ.
    (arm_load_acquire_exclusivedi): Likewise.
    (arm_store_release_exclusivedi): Likewise.

    libgcc/
    * gcc.target/arm/atomic-comp-swap-release-acquire.c: Rename into ...
    * gcc.target/arm/atomic-comp-swap-release-acquire-1.c: This.
    * gcc.target/arm/atomic-op-acq_rel.c: Rename into ...
    * gcc.target/arm/atomic-op-acq_rel-1.c: This.
    * gcc.target/arm/atomic-op-acquire.c: Rename into ...
    * gcc.target/arm/atomic-op-acquire-1.c: This.
    * gcc.target/arm/atomic-op-char.c: Rename into ...
    * gcc.target/arm/atomic-op-char-1.c: This.
    * gcc.target/arm/atomic-op-consume.c: Rename into ...
    * gcc.target/arm/atomic-op-consume-1.c: This.
    * gcc.target/arm/atomic-op-int.c: Rename into ...
    * gcc.target/arm/atomic-op-int-1.c: This.
    * gcc.target/arm/atomic-op-relaxed.c: Rename into ...
    * gcc.target/arm/atomic-op-relaxed-1.c: This.
    * gcc.target/arm/atomic-op-release.c: Rename into ...
    * gcc.target/arm/atomic-op-release-1.c: This.
    * gcc.target/arm/atomic-op-seq_cst.c: Rename into ...
    * gcc.target/arm/atomic-op-seq_cst-1.c: This.
    * gcc.target/arm/atomic-op-short.c: Rename into ...
    * gcc.target/arm/atomic-op-short-1.c: This.
    * gcc.target/arm/atomic-comp-swap-release-acquire-2.c: New test.
    * gcc.target/arm/atomic-op-acq_rel-2.c: Likewise.
    * gcc.target/arm/atomic-op-acquire-2.c: Likewise.
    * gcc.target/arm/atomic-op-char-2.c: Likewise.
    * gcc.target/arm/atomic-op-consume-2.c: Likewise.
    * gcc.target/arm/atomic-op-int-2.c: Likewise.
    * gcc.target/arm/atomic-op-relaxed-2.c: Likewise.
    * gcc.target/arm/atomic-op-release-2.c: Likewise.
    * gcc.target/arm/atomic-op-seq_cst-2.c: Likewise.
    * gcc.target/arm/atomic-op-short-2.c: Likewise.

From-SVN: r238348

34 files changed:
gcc/ChangeLog
gcc/config/arm/arm.h
gcc/config/arm/sync.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire.c [deleted file]
gcc/testsuite/gcc.target/arm/atomic-op-acq_rel-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-acq_rel-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-acq_rel.c [deleted file]
gcc/testsuite/gcc.target/arm/atomic-op-acquire-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-acquire-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-acquire.c [deleted file]
gcc/testsuite/gcc.target/arm/atomic-op-char-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-char-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-char.c [deleted file]
gcc/testsuite/gcc.target/arm/atomic-op-consume-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-consume-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-consume.c [deleted file]
gcc/testsuite/gcc.target/arm/atomic-op-int-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-int-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-int.c [deleted file]
gcc/testsuite/gcc.target/arm/atomic-op-relaxed-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-relaxed-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-relaxed.c [deleted file]
gcc/testsuite/gcc.target/arm/atomic-op-release-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-release-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-release.c [deleted file]
gcc/testsuite/gcc.target/arm/atomic-op-seq_cst-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-seq_cst-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-seq_cst.c [deleted file]
gcc/testsuite/gcc.target/arm/atomic-op-short-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-short-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-short.c [deleted file]

index 3232bafa118d3140da2b26ad8f229229e5e1e3ae..e62f2d8fc9cbcd37efa9f702c378982ed657d0ae 100644 (file)
@@ -1,3 +1,12 @@
+2016-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+       * config/arm/arm.h (TARGET_HAVE_LDACQ): Enable for ARMv8-M Mainline.
+       (TARGET_HAVE_LDACQD): New macro.
+       * config/arm/sync.md (atomic_loaddi): Use TARGET_HAVE_LDACQD rather
+       than TARGET_HAVE_LDACQ.
+       (arm_load_acquire_exclusivedi): Likewise.
+       (arm_store_release_exclusivedi): Likewise.
+
 2016-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
        PR rtl-optimization/71878
index 317885cf7197b6755c4d9b5717afe61662626786..c7149d1f49738f9f01232cdcb610caca0e5f7e5d 100644 (file)
@@ -261,7 +261,12 @@ extern void (*arm_lang_output_object_attributes_hook)(void);
                             || arm_arch7) && arm_arch_notm)
 
 /* Nonzero if this chip supports load-acquire and store-release.  */
-#define TARGET_HAVE_LDACQ      (TARGET_ARM_ARCH >= 8 && arm_arch_notm)
+#define TARGET_HAVE_LDACQ      (TARGET_ARM_ARCH >= 8 && TARGET_32BIT)
+
+/* Nonzero if this chip supports LDAEXD and STLEXD.  */
+#define TARGET_HAVE_LDACQEXD   (TARGET_ARM_ARCH >= 8   \
+                                && TARGET_32BIT        \
+                                && arm_arch_notm)
 
 /* Nonzero if this chip provides the MOVW and MOVT instructions.  */
 #define TARGET_HAVE_MOVT       (arm_arch_thumb2 || arm_arch8)
index abcfbcb1eacaabc597c9fde475c1b56624fb5a59..d10ede4175f94e627a23bf32d19d2b5f3de76771 100644 (file)
   [(match_operand:DI 0 "s_register_operand")           ;; val out
    (match_operand:DI 1 "mem_noofs_operand")            ;; memory
    (match_operand:SI 2 "const_int_operand")]           ;; model
-  "(TARGET_HAVE_LDREXD || TARGET_HAVE_LPAE || TARGET_HAVE_LDACQ)
+  "(TARGET_HAVE_LDREXD || TARGET_HAVE_LPAE || TARGET_HAVE_LDACQEXD)
    && ARM_DOUBLEWORD_ALIGN"
 {
   memmodel model = memmodel_from_int (INTVAL (operands[2]));
   /* For ARMv8-A we can use an LDAEXD to atomically load two 32-bit registers
      when acquire or stronger semantics are needed.  When the relaxed model is
      used this can be relaxed to a normal LDRD.  */
-  if (TARGET_HAVE_LDACQ)
+  if (TARGET_HAVE_LDACQEXD)
     {
       if (is_mm_relaxed (model))
        emit_insn (gen_arm_atomic_loaddi2_ldrd (operands[0], operands[1]));
        (unspec_volatile:DI
          [(match_operand:DI 1 "mem_noofs_operand" "Ua")]
          VUNSPEC_LAX))]
-  "TARGET_HAVE_LDACQ && ARM_DOUBLEWORD_ALIGN"
+  "TARGET_HAVE_LDACQEXD && ARM_DOUBLEWORD_ALIGN"
   "ldaexd%?\t%0, %H0, %C1"
   [(set_attr "predicable" "yes")
    (set_attr "predicable_short_it" "no")])
        (unspec_volatile:DI
          [(match_operand:DI 2 "s_register_operand" "r")]
          VUNSPEC_SLX))]
-  "TARGET_HAVE_LDACQ && ARM_DOUBLEWORD_ALIGN"
+  "TARGET_HAVE_LDACQEXD && ARM_DOUBLEWORD_ALIGN"
   {
     /* See comment in arm_store_exclusive<mode> above.  */
     gcc_assert ((REGNO (operands[2]) & 1) == 0 || TARGET_THUMB2);
index ef810565182ada45b1cb79c89be31b5b5d3a210a..95705821eb17e24508beca1f2fb5a673650fdd21 100644 (file)
@@ -1,3 +1,36 @@
+2016-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+       * gcc.target/arm/atomic-comp-swap-release-acquire.c: Rename into ...
+       * gcc.target/arm/atomic-comp-swap-release-acquire-1.c: This.
+       * gcc.target/arm/atomic-op-acq_rel.c: Rename into ...
+       * gcc.target/arm/atomic-op-acq_rel-1.c: This.
+       * gcc.target/arm/atomic-op-acquire.c: Rename into ...
+       * gcc.target/arm/atomic-op-acquire-1.c: This.
+       * gcc.target/arm/atomic-op-char.c: Rename into ...
+       * gcc.target/arm/atomic-op-char-1.c: This.
+       * gcc.target/arm/atomic-op-consume.c: Rename into ...
+       * gcc.target/arm/atomic-op-consume-1.c: This.
+       * gcc.target/arm/atomic-op-int.c: Rename into ...
+       * gcc.target/arm/atomic-op-int-1.c: This.
+       * gcc.target/arm/atomic-op-relaxed.c: Rename into ...
+       * gcc.target/arm/atomic-op-relaxed-1.c: This.
+       * gcc.target/arm/atomic-op-release.c: Rename into ...
+       * gcc.target/arm/atomic-op-release-1.c: This.
+       * gcc.target/arm/atomic-op-seq_cst.c: Rename into ...
+       * gcc.target/arm/atomic-op-seq_cst-1.c: This.
+       * gcc.target/arm/atomic-op-short.c: Rename into ...
+       * gcc.target/arm/atomic-op-short-1.c: This.
+       * gcc.target/arm/atomic-comp-swap-release-acquire-2.c: New test.
+       * gcc.target/arm/atomic-op-acq_rel-2.c: Likewise.
+       * gcc.target/arm/atomic-op-acquire-2.c: Likewise.
+       * gcc.target/arm/atomic-op-char-2.c: Likewise.
+       * gcc.target/arm/atomic-op-consume-2.c: Likewise.
+       * gcc.target/arm/atomic-op-int-2.c: Likewise.
+       * gcc.target/arm/atomic-op-relaxed-2.c: Likewise.
+       * gcc.target/arm/atomic-op-release-2.c: Likewise.
+       * gcc.target/arm/atomic-op-seq_cst-2.c: Likewise.
+       * gcc.target/arm/atomic-op-short-2.c: Likewise.
+
 2016-07-14  Andre Vehreschild  <vehre@gcc.gnu.org>
 
        PR fortran/70842
diff --git a/gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire-1.c b/gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire-1.c
new file mode 100644 (file)
index 0000000..aa11ba5
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2 -fno-ipa-icf" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-comp-swap-release-acquire.x"
+
+/* { dg-final { scan-assembler-times "ldaex" 4 } } */
+/* { dg-final { scan-assembler-times "stlex" 4 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire-2.c b/gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire-2.c
new file mode 100644 (file)
index 0000000..73b140a
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8m_main_ok } */
+/* { dg-options "-O2 -fno-ipa-icf" } */
+/* { dg-add-options arm_arch_v8m_main } */
+
+#include "../aarch64/atomic-comp-swap-release-acquire.x"
+
+/* { dg-final { scan-assembler-times "ldaex" 4 } } */
+/* { dg-final { scan-assembler-times "stlex" 4 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire.c b/gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire.c
deleted file mode 100644 (file)
index aa11ba5..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target arm_arch_v8a_ok } */
-/* { dg-options "-O2 -fno-ipa-icf" } */
-/* { dg-add-options arm_arch_v8a } */
-
-#include "../aarch64/atomic-comp-swap-release-acquire.x"
-
-/* { dg-final { scan-assembler-times "ldaex" 4 } } */
-/* { dg-final { scan-assembler-times "stlex" 4 } } */
-/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-acq_rel-1.c b/gcc/testsuite/gcc.target/arm/atomic-op-acq_rel-1.c
new file mode 100644 (file)
index 0000000..ccfa31c
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-acq_rel.x"
+
+/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stlex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-acq_rel-2.c b/gcc/testsuite/gcc.target/arm/atomic-op-acq_rel-2.c
new file mode 100644 (file)
index 0000000..26f88c8
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8m_main_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8m_main } */
+
+#include "../aarch64/atomic-op-acq_rel.x"
+
+/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stlex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-acq_rel.c b/gcc/testsuite/gcc.target/arm/atomic-op-acq_rel.c
deleted file mode 100644 (file)
index ccfa31c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target arm_arch_v8a_ok } */
-/* { dg-options "-O2" } */
-/* { dg-add-options arm_arch_v8a } */
-
-#include "../aarch64/atomic-op-acq_rel.x"
-
-/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-times "stlex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-acquire-1.c b/gcc/testsuite/gcc.target/arm/atomic-op-acquire-1.c
new file mode 100644 (file)
index 0000000..52bcf99
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-acquire.x"
+
+/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-acquire-2.c b/gcc/testsuite/gcc.target/arm/atomic-op-acquire-2.c
new file mode 100644 (file)
index 0000000..09062eb
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8m_main_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8m_main } */
+
+#include "../aarch64/atomic-op-acquire.x"
+
+/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-acquire.c b/gcc/testsuite/gcc.target/arm/atomic-op-acquire.c
deleted file mode 100644 (file)
index 52bcf99..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target arm_arch_v8a_ok } */
-/* { dg-options "-O2" } */
-/* { dg-add-options arm_arch_v8a } */
-
-#include "../aarch64/atomic-op-acquire.x"
-
-/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-char-1.c b/gcc/testsuite/gcc.target/arm/atomic-op-char-1.c
new file mode 100644 (file)
index 0000000..0c30922
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-char.x"
+
+/* { dg-final { scan-assembler-times "ldrexb\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strexb\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-char-2.c b/gcc/testsuite/gcc.target/arm/atomic-op-char-2.c
new file mode 100644 (file)
index 0000000..3f33857
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8m_main_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8m_main } */
+
+#include "../aarch64/atomic-op-char.x"
+
+/* { dg-final { scan-assembler-times "ldrexb\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strexb\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-char.c b/gcc/testsuite/gcc.target/arm/atomic-op-char.c
deleted file mode 100644 (file)
index 0c30922..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target arm_arch_v8a_ok } */
-/* { dg-options "-O2" } */
-/* { dg-add-options arm_arch_v8a } */
-
-#include "../aarch64/atomic-op-char.x"
-
-/* { dg-final { scan-assembler-times "ldrexb\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-times "strexb\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-consume-1.c b/gcc/testsuite/gcc.target/arm/atomic-op-consume-1.c
new file mode 100644 (file)
index 0000000..6c5f989
--- /dev/null
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-consume.x"
+
+/* Scan for ldaex is a PR59448 consume workaround.  */
+/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-consume-2.c b/gcc/testsuite/gcc.target/arm/atomic-op-consume-2.c
new file mode 100644 (file)
index 0000000..9771d81
--- /dev/null
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8m_main_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8m_main } */
+
+#include "../aarch64/atomic-op-consume.x"
+
+/* Scan for ldaex is a PR59448 consume workaround.  */
+/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-consume.c b/gcc/testsuite/gcc.target/arm/atomic-op-consume.c
deleted file mode 100644 (file)
index 6c5f989..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target arm_arch_v8a_ok } */
-/* { dg-options "-O2" } */
-/* { dg-add-options arm_arch_v8a } */
-
-#include "../aarch64/atomic-op-consume.x"
-
-/* Scan for ldaex is a PR59448 consume workaround.  */
-/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-int-1.c b/gcc/testsuite/gcc.target/arm/atomic-op-int-1.c
new file mode 100644 (file)
index 0000000..7716994
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-int.x"
+
+/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-int-2.c b/gcc/testsuite/gcc.target/arm/atomic-op-int-2.c
new file mode 100644 (file)
index 0000000..ce0fbfc
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8m_main_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8m_main } */
+
+#include "../aarch64/atomic-op-int.x"
+
+/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-int.c b/gcc/testsuite/gcc.target/arm/atomic-op-int.c
deleted file mode 100644 (file)
index 7716994..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target arm_arch_v8a_ok } */
-/* { dg-options "-O2" } */
-/* { dg-add-options arm_arch_v8a } */
-
-#include "../aarch64/atomic-op-int.x"
-
-/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-relaxed-1.c b/gcc/testsuite/gcc.target/arm/atomic-op-relaxed-1.c
new file mode 100644 (file)
index 0000000..4b72fd9
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-relaxed.x"
+
+/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-relaxed-2.c b/gcc/testsuite/gcc.target/arm/atomic-op-relaxed-2.c
new file mode 100644 (file)
index 0000000..207baf7
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8m_main_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8m_main } */
+
+#include "../aarch64/atomic-op-relaxed.x"
+
+/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-relaxed.c b/gcc/testsuite/gcc.target/arm/atomic-op-relaxed.c
deleted file mode 100644 (file)
index 4b72fd9..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target arm_arch_v8a_ok } */
-/* { dg-options "-O2" } */
-/* { dg-add-options arm_arch_v8a } */
-
-#include "../aarch64/atomic-op-relaxed.x"
-
-/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-release-1.c b/gcc/testsuite/gcc.target/arm/atomic-op-release-1.c
new file mode 100644 (file)
index 0000000..8582e4f
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-release.x"
+
+/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stlex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-release-2.c b/gcc/testsuite/gcc.target/arm/atomic-op-release-2.c
new file mode 100644 (file)
index 0000000..376f859
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8m_main_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8m_main } */
+
+#include "../aarch64/atomic-op-release.x"
+
+/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stlex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-release.c b/gcc/testsuite/gcc.target/arm/atomic-op-release.c
deleted file mode 100644 (file)
index 8582e4f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target arm_arch_v8a_ok } */
-/* { dg-options "-O2" } */
-/* { dg-add-options arm_arch_v8a } */
-
-#include "../aarch64/atomic-op-release.x"
-
-/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-times "stlex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-seq_cst-1.c b/gcc/testsuite/gcc.target/arm/atomic-op-seq_cst-1.c
new file mode 100644 (file)
index 0000000..70b5b9e
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-seq_cst.x"
+
+/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stlex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-seq_cst-2.c b/gcc/testsuite/gcc.target/arm/atomic-op-seq_cst-2.c
new file mode 100644 (file)
index 0000000..4b31083
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8m_main_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8m_main } */
+
+#include "../aarch64/atomic-op-seq_cst.x"
+
+/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stlex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-seq_cst.c b/gcc/testsuite/gcc.target/arm/atomic-op-seq_cst.c
deleted file mode 100644 (file)
index 70b5b9e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target arm_arch_v8a_ok } */
-/* { dg-options "-O2" } */
-/* { dg-add-options arm_arch_v8a } */
-
-#include "../aarch64/atomic-op-seq_cst.x"
-
-/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-times "stlex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-short-1.c b/gcc/testsuite/gcc.target/arm/atomic-op-short-1.c
new file mode 100644 (file)
index 0000000..a6f5a6d
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-short.x"
+
+/* { dg-final { scan-assembler-times "ldrexh\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strexh\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-short-2.c b/gcc/testsuite/gcc.target/arm/atomic-op-short-2.c
new file mode 100644 (file)
index 0000000..e9b35f3
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8m_main_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8m_main } */
+
+#include "../aarch64/atomic-op-short.x"
+
+/* { dg-final { scan-assembler-times "ldrexh\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strexh\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-short.c b/gcc/testsuite/gcc.target/arm/atomic-op-short.c
deleted file mode 100644 (file)
index a6f5a6d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target arm_arch_v8a_ok } */
-/* { dg-options "-O2" } */
-/* { dg-add-options arm_arch_v8a } */
-
-#include "../aarch64/atomic-op-short.x"
-
-/* { dg-final { scan-assembler-times "ldrexh\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-times "strexh\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
-/* { dg-final { scan-assembler-not "dmb" } } */