On 20/03/2025 14:31, Alfie Richards wrote:
> From: Andrew Carlotti <andrew.carlo...@arm.com>
> 
> gcc/ChangeLog:
> 

I think you need to add:

        PR target/119372

here, so that the backport commits get tracked in bugzilla.

Thanks,
Alex

>       * config/aarch64/aarch64.cc
>       (aarch64_expand_epilogue): Use TARGET_PAUTH.
>       * config/aarch64/aarch64.md: Update comment.
> ---
>  gcc/config/aarch64/aarch64.cc | 6 +++---
>  gcc/config/aarch64/aarch64.md | 8 ++++----
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
> index 0a98f005b71..b211f9abd60 100644
> --- a/gcc/config/aarch64/aarch64.cc
> +++ b/gcc/config/aarch64/aarch64.cc
> @@ -10363,12 +10363,12 @@ aarch64_expand_epilogue (bool for_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 ()
> -      && (for_sibcall || !TARGET_ARMV8_3))
> +      && (for_sibcall || !TARGET_PAUTH))
>      {
>        switch (aarch_ra_sign_key)
>       {
> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
> index b585604cbe0..ff74e7dcef6 100644
> --- a/gcc/config/aarch64/aarch64.md
> +++ b/gcc/config/aarch64/aarch64.md
> @@ -7280,11 +7280,11 @@ (define_insn "aarch64_fjcvtzs"
>    [(set_attr "type" "f_cvtf2i")]
>  )
>  
> -;; Pointer authentication patterns are always provided.  In architecture
> -;; revisions prior to ARMv8.3-A these HINT instructions operate as NOPs.
> +;; Pointer authentication patterns are always provided.  On targets that
> +;; don't implement FEAT_PAuth these HINT instructions operate as NOPs.
>  ;; 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.
> -- 
> 2.34.1
> 

Reply via email to