Hi Richard,

Is this backport okay for GCC 14 as well?
(It applies cleanly for 14 but patch for 12 and 13 required a minor edit)

Alfie

On 20/03/2025 14:05, Alfie Richards wrote:
Hi all,

This commit applies cleanly to GCC 14 and fixes PR119372.

Bootstrapped and regtested on aarch64-linux-gnu.

Okay for gcc 14 backport?

Alfie Richards

On 08/10/2024 16:46, Richard Sandiford wrote:
Andrew Carlotti <andrew.carlo...@arm.com> writes:
gcc/ChangeLog:

    * config/aarch64/aarch64.cc
    (aarch64_expand_epilogue): Use TARGET_PAUTH.
    * config/aarch64/aarch64.md: Update comment.


diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/ aarch64.cc index e7bb3278a27eca44c46afd26069d608218198a54..cf1107127fd5d9e12ad42441528666bf6b733f73 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -10042,12 +10042,12 @@ aarch64_expand_epilogue (rtx_call_insn *sibcall)       1) Sibcalls don't return in a normal way, so if we're about to call one
         we must authenticate.
-    2) The RETAA instruction is not available before ARMv8.3-A, so if we are
-       generating code for !TARGET_ARMV8_3 we can't use it and must
+    2) The RETAA instruction is not available without FEAT_PAuth, so if we
+       are generating code for !TARGET_PAUTH we can't use it and must
         explicitly authenticate.
      */
    if (aarch64_return_address_signing_enabled ()
-      && (sibcall || !TARGET_ARMV8_3))
+      && (sibcall || !TARGET_PAUTH))
      {
        switch (aarch64_ra_sign_key)
      {
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/ aarch64.md index c54b29cd64b9e0dc6c6d12735049386ccedc5408..0940a84f9295ee2bc07282b150095fdb5af11a4d 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -7672,10 +7672,10 @@
  )
  ;; Pointer authentication patterns are always provided.  In architecture -;; revisions prior to ARMv8.3-A these HINT instructions operate as NOPs. +;; revisions prior to FEAT_PAuth these HINT instructions operate as NOPs.

I suppose this should be something like "On targets that don't implement
FEAT_PAuth".  OK with that change, thanks.

Richard

  ;; This lets the user write portable software which authenticates pointers
-;; when run on something which implements ARMv8.3-A, and which runs
-;; correctly, but does not authenticate pointers, where ARMv8.3-A is not
+;; when run on something which implements FEAT_PAuth, and which runs
+;; correctly, but does not authenticate pointers, where FEAT_PAuth is not
  ;; implemented.
  ;; Signing/Authenticating R30 using SP as the salt.



Reply via email to