109 lines
4.5 KiB
Diff
109 lines
4.5 KiB
Diff
From 0bfb7b0b745d0a9af13772ad48ccc102e557f95a Mon Sep 17 00:00:00 2001
|
|
From: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
|
Date: Mon, 26 Sep 2022 10:10:25 +0100
|
|
Subject: [PATCH 007/157] [Backport][SME] aarch64: Add -march support for
|
|
Armv9.1-A, Armv9.2-A, Armv9.3-A
|
|
|
|
Reference: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=c33e12fa479c01848f4a288883bf1ef848c94ca3
|
|
|
|
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 | 3 +++
|
|
gcc/config/aarch64/aarch64.h | 18 ++++++++++++++++++
|
|
gcc/doc/invoke.texi | 3 +++
|
|
3 files changed, 24 insertions(+)
|
|
|
|
diff --git a/gcc/config/aarch64/aarch64-arches.def b/gcc/config/aarch64/aarch64-arches.def
|
|
index 3c2b16588..6150448dc 100644
|
|
--- a/gcc/config/aarch64/aarch64-arches.def
|
|
+++ b/gcc/config/aarch64/aarch64-arches.def
|
|
@@ -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
|
|
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
|
|
index 7d73689e4..42aae37ef 100644
|
|
--- a/gcc/config/aarch64/aarch64.h
|
|
+++ b/gcc/config/aarch64/aarch64.h
|
|
@@ -239,6 +239,15 @@
|
|
/* 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)
|
|
|
|
@@ -274,6 +283,12 @@
|
|
#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. */
|
|
|
|
@@ -314,6 +329,9 @@
|
|
#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)
|
|
|
|
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
|
|
index 17d9e4126..53709b246 100644
|
|
--- a/gcc/doc/invoke.texi
|
|
+++ b/gcc/doc/invoke.texi
|
|
@@ -19176,6 +19176,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
|
|
|
|
--
|
|
2.33.0
|
|
|