public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-6233] aarch64: Add support for GCS system registers with the +gcs modifier
@ 2023-12-06 21:22 Victor Do Nascimento
0 siblings, 0 replies; only message in thread
From: Victor Do Nascimento @ 2023-12-06 21:22 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:3aba045882d1f589d36eaedd947a014ac6eb5ec3
commit r14-6233-g3aba045882d1f589d36eaedd947a014ac6eb5ec3
Author: Victor Do Nascimento <victor.donascimento@arm.com>
Date: Fri Nov 3 16:44:56 2023 +0000
aarch64: Add support for GCS system registers with the +gcs modifier
Given the introduction of system registers associated with the Guarded
Control Stack extension to Armv9.4-a in Binutils and their reliance on
the `+gcs' modifier, we implement the necessary changes in GCC to
allow for them to be recognized by the compiler.
gcc/ChangeLog:
* config/aarch64/aarch64-option-extensions.def (gcs): New.
* config/aarch64/aarch64.h (AARCH64_ISA_GCS): New.
(TARGET_THE): Likewise.
* doc/invoke.texi (AArch64 Options): Describe GCS.
Diff:
---
gcc/config/aarch64/aarch64-option-extensions.def | 2 ++
gcc/config/aarch64/aarch64.h | 6 ++++++
gcc/doc/invoke.texi | 2 ++
3 files changed, 10 insertions(+)
diff --git a/gcc/config/aarch64/aarch64-option-extensions.def b/gcc/config/aarch64/aarch64-option-extensions.def
index 97f03395ffc..02fc895338e 100644
--- a/gcc/config/aarch64/aarch64-option-extensions.def
+++ b/gcc/config/aarch64/aarch64-option-extensions.def
@@ -163,4 +163,6 @@ AARCH64_OPT_EXTENSION("d128", D128, (), (), (), "d128")
AARCH64_OPT_EXTENSION("the", THE, (), (), (), "the")
+AARCH64_OPT_EXTENSION("gcs", GCS, (), (), (), "gcs")
+
#undef AARCH64_OPT_EXTENSION
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index f0af0b43358..5a776dfdff0 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -265,6 +265,7 @@ constexpr auto AARCH64_FL_DEFAULT_ISA_MODE = AARCH64_FL_SM_OFF;
#define AARCH64_ISA_CSSC (aarch64_isa_flags & AARCH64_FL_CSSC)
#define AARCH64_ISA_D128 (aarch64_isa_flags & AARCH64_FL_D128)
#define AARCH64_ISA_THE (aarch64_isa_flags & AARCH64_FL_THE)
+#define AARCH64_ISA_GCS (aarch64_isa_flags & AARCH64_FL_GCS)
/* The current function is a normal non-streaming function. */
#define TARGET_NON_STREAMING (AARCH64_ISA_SM_OFF)
@@ -465,6 +466,11 @@ constexpr auto AARCH64_FL_DEFAULT_ISA_MODE = AARCH64_FL_SM_OFF;
enabled through +the. */
#define TARGET_THE (AARCH64_ISA_THE)
+/* Armv9.4-A Guarded Control Stack extension system registers are
+ enabled through +gcs. */
+#define TARGET_GCS (AARCH64_ISA_GCS)
+
+
/* Standard register usage. */
/* 31 64-bit general purpose registers R0-R30:
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index f5e5546080d..bff3645eedc 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -21363,6 +21363,8 @@ Enable the FEAT_SME_F64F64 extension to SME.
Enable the Scalable Matrix Extension 2. This also enables SME instructions.
@item d128
Enable support for 128-bit system register read/write instructions.
+@item gcs
+Enable support for Armv9.4-a Guarded Control Stack extension.
@item the
Enable support for Armv8.9-a/9.4-a translation hardening extension.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-06 21:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-06 21:22 [gcc r14-6233] aarch64: Add support for GCS system registers with the +gcs modifier Victor Do Nascimento
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).