From: Richard Earnshaw <[email protected]>

Arm has sunset the tme extension from the aarch64 architecture since
there are no known implementations.  Since this has been present in the
compiler for a while though, we need to go through a deprecation cycle.

This patch starts that process by:
 - removing it from the documentation
 - warning if the option is used during compilation
 - removing the tests for it.

gcc/ChangeLog:

        * config/aarch64/aarch64.cc (aarch64_override_options): Warn if
        +tme is used as an architecture feature
        * doc/invoke.texi (aarch64): Remove mentions of +tme.

gcc/testsuite/ChangeLog:

        * gcc.target/aarch64/pragma_cpp_predefs_2.c: Drop tests for TME.
        * gcc.target/aarch64/acle/tme.c: Removed.
        * gcc.target/aarch64/acle/tme_guard-1.c: Removed.
        * gcc.target/aarch64/acle/tme_guard-2.c: Removed.
        * gcc.target/aarch64/acle/tme_guard-3.c: Removed.
        * gcc.target/aarch64/acle/tme_guard-4.c: Removed.
---
 gcc/config/aarch64/aarch64.cc                 |  4 +++
 gcc/doc/invoke.texi                           |  2 --
 gcc/testsuite/gcc.target/aarch64/acle/tme.c   | 34 -------------------
 .../gcc.target/aarch64/acle/tme_guard-1.c     |  9 -----
 .../gcc.target/aarch64/acle/tme_guard-2.c     | 10 ------
 .../gcc.target/aarch64/acle/tme_guard-3.c     |  9 -----
 .../gcc.target/aarch64/acle/tme_guard-4.c     | 10 ------
 .../gcc.target/aarch64/pragma_cpp_predefs_2.c | 12 -------
 8 files changed, 4 insertions(+), 86 deletions(-)
 delete mode 100644 gcc/testsuite/gcc.target/aarch64/acle/tme.c
 delete mode 100644 gcc/testsuite/gcc.target/aarch64/acle/tme_guard-1.c
 delete mode 100644 gcc/testsuite/gcc.target/aarch64/acle/tme_guard-2.c
 delete mode 100644 gcc/testsuite/gcc.target/aarch64/acle/tme_guard-3.c
 delete mode 100644 gcc/testsuite/gcc.target/aarch64/acle/tme_guard-4.c

diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index 78f1eae8336c..fa1100e66572 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -20414,6 +20414,10 @@ aarch64_override_options (void)
   if (TARGET_ILP32)
     warning (OPT_Wdeprecated, "%<-mabi=ilp32%> is deprecated");
 
+  if (TARGET_TME)
+    warning (OPT_Wdeprecated,
+            "the architecture extension %<+tme%> is deprecated");
+
   if (global_options.x_pcrelative_literal_loads == 1)
     warning (OPT_Wdeprecated, "%<-mpc-relative-literal-loads%> is deprecated");
 
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 455ea08d7c73..736da9e07dba 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -21953,8 +21953,6 @@ Enable SVE2 sha3 instructions.  This also enables SVE2 
instructions.
 Enable SVE2.1 instructions.  This also enables SVE2 instructions.
 @item sve2p2
 Enable SVE2.2 instructions.  This also enables SVE2 and SVE2.1 instructions.
-@item tme
-Enable the Transactional Memory Extension.
 @item i8mm
 Enable 8-bit Integer Matrix Multiply instructions.  This also enables
 Advanced SIMD and floating-point instructions.  This option is enabled by
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/tme.c 
b/gcc/testsuite/gcc.target/aarch64/acle/tme.c
deleted file mode 100644
index 5df93b1dcb10..000000000000
--- a/gcc/testsuite/gcc.target/aarch64/acle/tme.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Test the TME intrinsics.  */
-
-/* { dg-do compile } */
-/* { dg-options "-save-temps -O2 -march=armv8-a+tme" } */
-
-#include "arm_acle.h"
-
-#define tcancel_reason 0x234
-
-unsigned
-check_tme (void)
-{
-  unsigned status = __tstart ();
-  if (status == 0)
-    {
-      if (__ttest () == 2)
-       {
-         __tcancel (tcancel_reason & _TMFAILURE_REASON);
-         return tcancel_reason;
-       }
-
-      __tcommit ();
-      return 0;
-    }
-  else if (status & _TMFAILURE_NEST)
-    return _TMFAILURE_NEST;
-  else if (status & _TMFAILURE_TRIVIAL)
-    return _TMFAILURE_TRIVIAL;
-}
-
-/* { dg-final { scan-assembler "tstart\tx..?\n" } } */
-/* { dg-final { scan-assembler "tcancel\t#564\n" } } */
-/* { dg-final { scan-assembler "ttest\tx..?\n" } } */
-/* { dg-final { scan-assembler "tcommit\n" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/tme_guard-1.c 
b/gcc/testsuite/gcc.target/aarch64/acle/tme_guard-1.c
deleted file mode 100644
index 9894d3341f6b..000000000000
--- a/gcc/testsuite/gcc.target/aarch64/acle/tme_guard-1.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* { dg-do compile } */
-/* { dg-additional-options "-march=armv8-a" } */
-
-#include <arm_acle.h>
-
-void foo (void)
-{
-  __tcommit (); /* { dg-error {ACLE function '__tcommit' requires ISA 
extension 'tme'} } */
-}
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/tme_guard-2.c 
b/gcc/testsuite/gcc.target/aarch64/acle/tme_guard-2.c
deleted file mode 100644
index 4e3d69712b14..000000000000
--- a/gcc/testsuite/gcc.target/aarch64/acle/tme_guard-2.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile } */
-/* { dg-additional-options "-march=armv8-a" } */
-
-#include <arm_acle.h>
-
-#pragma GCC target("arch=armv8-a+tme")
-void foo (void)
-{
-  __tcommit ();
-}
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/tme_guard-3.c 
b/gcc/testsuite/gcc.target/aarch64/acle/tme_guard-3.c
deleted file mode 100644
index 5f480ebb8209..000000000000
--- a/gcc/testsuite/gcc.target/aarch64/acle/tme_guard-3.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* { dg-do compile } */
-/* { dg-additional-options "-march=armv8-a+tme -mgeneral-regs-only" } */
-
-#include <arm_acle.h>
-
-void foo (void)
-{
-  __tcommit ();
-}
diff --git a/gcc/testsuite/gcc.target/aarch64/acle/tme_guard-4.c 
b/gcc/testsuite/gcc.target/aarch64/acle/tme_guard-4.c
deleted file mode 100644
index bf4d368370c6..000000000000
--- a/gcc/testsuite/gcc.target/aarch64/acle/tme_guard-4.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile } */
-/* { dg-additional-options "-march=armv8-a+tme" } */
-
-#include <arm_acle.h>
-
-#pragma GCC target("arch=armv8-a")
-void foo (void)
-{
-  __tcommit (); /* { dg-error {ACLE function '__tcommit' requires ISA 
extension 'tme'} } */
-}
diff --git a/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_2.c 
b/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_2.c
index d8fc86d15578..76fc5b5680e2 100644
--- a/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_2.c
@@ -4,18 +4,6 @@
 #pragma GCC push_options
 #pragma GCC target ("arch=armv8-a")
 
-#pragma GCC push_options
-#pragma GCC target ("arch=armv8-a+tme")
-#ifndef __ARM_FEATURE_TME
-#error "__ARM_FEATURE_TME is not defined but should be!"
-#endif
-
-#pragma GCC pop_options
-
-#ifdef __ARM_FEATURE_TME
-#error "__ARM_FEATURE_TME is defined but should not be!"
-#endif
-
 /* Test Armv8.6-A features.  */
 
 #ifdef __ARM_FEATURE_MATMUL_INT8
-- 
2.54.0

Reply via email to