]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Add -march support for Armv9.1-A, Armv9.2-A, Armv9.3-A
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Mon, 26 Sep 2022 09:10:25 +0000 (10:10 +0100)
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>
Mon, 26 Sep 2022 09:14:30 +0000 (10:14 +0100)
This is a straightforward patch that allows targeting the architecture revisions mentioned in the subject
through -march. These are already supported in binutils.

Bootstrapped and tested on aarch64-none-linux-gnu.

gcc/ChangeLog:

* config/aarch64/aarch64-arches.def (armv9.1-a): Define.
(armv9.2-a): Likewise.
(armv9.3-a): Likewise.
* config/aarch64/aarch64.h (AARCH64_FL_V9_1): Likewise.
(AARCH64_FL_V9_2): Likewise.
(AARCH64_FL_V9_3): Likewise.
(AARCH64_FL_FOR_ARCH9_1): Likewise.
(AARCH64_FL_FOR_ARCH9_2): Likewise.
(AARCH64_FL_FOR_ARCH9_3): Likewise.
(AARCH64_ISA_V9_1): Likewise.
(AARCH64_ISA_V9_2): Likewise.
(AARCH64_ISA_V9_3): Likewise.
* doc/invoke.texi (AArch64 Options): Document armv9.1-a, armv9.2-a,
armv9.3-a values to -march.

gcc/config/aarch64/aarch64-arches.def
gcc/config/aarch64/aarch64.h
gcc/doc/invoke.texi

index 3c2b1658897fa91db89c71f35b9e08598faac050..6150448dc30efe6ec0a6ed24c81b7907da56aeeb 100644 (file)
@@ -41,5 +41,8 @@ AARCH64_ARCH("armv8.7-a",     generic,       8_7A,      8,  AARCH64_FL_FOR_ARCH8
 AARCH64_ARCH("armv8.8-a",     generic,       8_8A,      8,  AARCH64_FL_FOR_ARCH8_8)
 AARCH64_ARCH("armv8-r",       generic,      8R  ,      8,  AARCH64_FL_FOR_ARCH8_R)
 AARCH64_ARCH("armv9-a",       generic,      9A  ,      9,  AARCH64_FL_FOR_ARCH9)
+AARCH64_ARCH("armv9.1-a",     generic,       9_1A,      9,  AARCH64_FL_FOR_ARCH9_1)
+AARCH64_ARCH("armv9.2-a",     generic,       9_2A,      9,  AARCH64_FL_FOR_ARCH9_2)
+AARCH64_ARCH("armv9.3-a",     generic,       9_3A,      9,  AARCH64_FL_FOR_ARCH9_3)
 
 #undef AARCH64_ARCH
index 6f6bb70fde955f6664e7cd48236ef79d0ee330d5..f790de1cf46d68c78e2b6bae54ec7a72b4b2a020 100644 (file)
 /* Armv8.8-a architecture extensions.  */
 #define AARCH64_FL_V8_8       (1ULL << 45)
 
+/* Armv9.1-A.  */
+#define AARCH64_FL_V9_1       (1ULL << 46)
+
+/* Armv9.2-A.  */
+#define AARCH64_FL_V9_2       (1ULL << 47)
+
+/* Armv9.3-A.  */
+#define AARCH64_FL_V9_3       (1ULL << 48)
+
 /* Has FP and SIMD.  */
 #define AARCH64_FL_FPSIMD     (AARCH64_FL_FP | AARCH64_FL_SIMD)
 
 #define AARCH64_FL_FOR_ARCH9       \
   (AARCH64_FL_FOR_ARCH8_5 | AARCH64_FL_SVE | AARCH64_FL_SVE2 | AARCH64_FL_V9 \
    | AARCH64_FL_F16)
+#define AARCH64_FL_FOR_ARCH9_1 \
+  (AARCH64_FL_FOR_ARCH9 | AARCH64_FL_FOR_ARCH8_6 | AARCH64_FL_V9_1)
+#define AARCH64_FL_FOR_ARCH9_2 \
+  (AARCH64_FL_FOR_ARCH9_1 | AARCH64_FL_FOR_ARCH8_7 | AARCH64_FL_V9_2)
+#define AARCH64_FL_FOR_ARCH9_3 \
+  (AARCH64_FL_FOR_ARCH9_2 | AARCH64_FL_FOR_ARCH8_8 | AARCH64_FL_V9_3)
 
 /* Macros to test ISA flags.  */
 
 #define AARCH64_ISA_V8_R          (aarch64_isa_flags & AARCH64_FL_V8_R)
 #define AARCH64_ISA_PAUTH         (aarch64_isa_flags & AARCH64_FL_PAUTH)
 #define AARCH64_ISA_V9            (aarch64_isa_flags & AARCH64_FL_V9)
+#define AARCH64_ISA_V9_1           (aarch64_isa_flags & AARCH64_FL_V9_1)
+#define AARCH64_ISA_V9_2           (aarch64_isa_flags & AARCH64_FL_V9_2)
+#define AARCH64_ISA_V9_3           (aarch64_isa_flags & AARCH64_FL_V9_3)
 #define AARCH64_ISA_MOPS          (aarch64_isa_flags & AARCH64_FL_MOPS)
 #define AARCH64_ISA_LS64          (aarch64_isa_flags & AARCH64_FL_LS64)
 
index 928ab0ff02f2e7ced54bd560a215ffb74e27ab55..19275c5533613185ae717c33be491ee6a316f436 100644 (file)
@@ -19681,6 +19681,9 @@ and the features that they enable by default:
 @item @samp{armv8.7-a} @tab Armv8.7-A @tab @samp{armv8.6-a}, @samp{+ls64}
 @item @samp{armv8.8-a} @tab Armv8.8-a @tab @samp{armv8.7-a}, @samp{+mops}
 @item @samp{armv9-a} @tab Armv9-A @tab @samp{armv8.5-a}, @samp{+sve}, @samp{+sve2}
+@item @samp{armv9.1-a} @tab Armv9.1-A @tab @samp{armv9-a}, @samp{+bf16}, @samp{+i8mm}
+@item @samp{armv9.2-a} @tab Armv9.2-A @tab @samp{armv9.1-a}, @samp{+ls64}
+@item @samp{armv9.3-a} @tab Armv9.3-A @tab @samp{armv9.2-a}, @samp{+mops}
 @item @samp{armv8-r} @tab Armv8-R @tab @samp{armv8-r}
 @end multitable