https://gcc.gnu.org/g:35ed15af7ddab55c2ea1c07811f273a7c4e223fa
commit r14-11513-g35ed15af7ddab55c2ea1c07811f273a7c4e223fa Author: Andrew Carlotti <andrew.carlo...@arm.com> Date: Tue Jul 30 16:26:04 2024 +0100 aarch64: Use PAUTH instead of V8_3A in some places PR target/119383 gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_expand_epilogue): Use TARGET_PAUTH. * config/aarch64/aarch64.md: Update comment. (cherry picked from commit 20385cb92cbd4a1934661ab97a162c1e25935836) Diff: --- 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 0495adc7dd37..8f3a3735a97d 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -9995,12 +9995,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 a08523a2b074..d3c381e82ce4 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -7627,11 +7627,11 @@ [(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.