public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Kyrylo Tkachov <ktkachov@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-2866] aarch64: Add -march support for Armv9.1-A, Armv9.2-A, Armv9.3-A
Date: Mon, 26 Sep 2022 09:14:53 +0000 (GMT)	[thread overview]
Message-ID: <20220926091453.4967F3857342@sourceware.org> (raw)

https://gcc.gnu.org/g:c33e12fa479c01848f4a288883bf1ef848c94ca3

commit r13-2866-gc33e12fa479c01848f4a288883bf1ef848c94ca3
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date:   Mon Sep 26 10:10:25 2022 +0100

    aarch64: Add -march support for Armv9.1-A, Armv9.2-A, Armv9.3-A
    
    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.

Diff:
---
 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 3c2b1658897..6150448dc30 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 6f6bb70fde9..f790de1cf46 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)
 
@@ -273,6 +282,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.  */
 
@@ -312,6 +327,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 928ab0ff02f..19275c55336 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -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

                 reply	other threads:[~2022-09-26  9:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220926091453.4967F3857342@sourceware.org \
    --to=ktkachov@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).