@@ -1865,7 +1865,7 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
18651865 void setSP (uint64_t value) { _registers.__sp = value; }
18661866 uint64_t getIP () const {
18671867 uint64_t value = _registers.__pc ;
1868- #if __has_feature(ptrauth_calls )
1868+ #if defined(_LIBUNWIND_TARGET_AARCH64_AUTHENTICATED_UNWINDING )
18691869 // Note the value of the PC was signed to its address in the register state
18701870 // but everyone else expects it to be sign by the SP, so convert on return.
18711871 value = (uint64_t )ptrauth_auth_and_resign ((void *)_registers.__pc ,
@@ -1877,7 +1877,7 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
18771877 return value;
18781878 }
18791879 void setIP (uint64_t value) {
1880- #if __has_feature(ptrauth_calls )
1880+ #if defined(_LIBUNWIND_TARGET_AARCH64_AUTHENTICATED_UNWINDING )
18811881 // Note the value which was set should have been signed with the SP.
18821882 // We then resign with the slot we are being stored in to so that both SP
18831883 // and LR can't be spoofed at the same time.
@@ -1892,7 +1892,7 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
18921892 uint64_t getFP () const { return _registers.__fp ; }
18931893 void setFP (uint64_t value) { _registers.__fp = value; }
18941894
1895- #if __has_feature(ptrauth_calls )
1895+ #if defined(_LIBUNWIND_TARGET_AARCH64_AUTHENTICATED_UNWINDING )
18961896 void
18971897 loadAndAuthenticateLinkRegister (reg_t inplaceAuthedLinkRegister,
18981898 link_reg_t *referenceAuthedLinkRegister) {
@@ -1944,7 +1944,7 @@ inline Registers_arm64::Registers_arm64(const void *registers) {
19441944 memcpy (_vectorHalfRegisters,
19451945 static_cast <const uint8_t *>(registers) + sizeof (GPRs),
19461946 sizeof (_vectorHalfRegisters));
1947- #if __has_feature(ptrauth_calls )
1947+ #if defined(_LIBUNWIND_TARGET_AARCH64_AUTHENTICATED_UNWINDING )
19481948 // We have to do some pointer authentication fixups after this copy,
19491949 // and as part of that we need to load the source pc without
19501950 // authenticating so that we maintain the signature for the resigning
@@ -1965,7 +1965,7 @@ Registers_arm64::operator=(const Registers_arm64 &other) {
19651965 memcpy (&_registers, &other._registers , sizeof (_registers));
19661966 memcpy (_vectorHalfRegisters, &other._vectorHalfRegisters ,
19671967 sizeof (_vectorHalfRegisters));
1968- #if __has_feature(ptrauth_calls )
1968+ #if defined(_LIBUNWIND_TARGET_AARCH64_AUTHENTICATED_UNWINDING )
19691969 // We perform this step to ensure that we correctly authenticate and re-sign
19701970 // the pc after the bitwise copy.
19711971 setIP (other.getIP ());
0 commit comments