]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Use PAUTH instead of V8_3A in some places
authorAndrew Carlotti <andrew.carlotti@arm.com>
Tue, 30 Jul 2024 15:26:04 +0000 (16:26 +0100)
committerAndrew Carlotti <andrew.carlotti@arm.com>
Fri, 10 Jan 2025 14:12:06 +0000 (14:12 +0000)
gcc/ChangeLog:

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

gcc/config/aarch64/aarch64.cc
gcc/config/aarch64/aarch64.md

index 6fe0fa2722bd4cdff5545f1c8bf2eabd4a03c1ff..ad31e9d255c05dda00c7c2b4755ccec33ae2c83d 100644 (file)
@@ -10283,12 +10283,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)
        {
index 0ed3c93b379eb4e47c17a334d9fb4df7de7a06d3..44f5b7a54d257ffc59959cc72c8e6612ad05ff55 100644 (file)
   [(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.