Message ID | 705937e6-c27e-fcb0-9b1b-203770a3c89e@e124511.cambridge.arm.com |
---|---|
State | New |
Headers | show |
Series | aarch64: Add new flags for existing features | expand |
Andrew Carlotti <andrew.carlotti@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.
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. ;; 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.