================
@@ -1922,12 +1922,20 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
void
loadAndAuthenticateLinkRegister(reg_t inplaceAuthedLinkRegister,
link_reg_t *referenceAuthedLinkRegister) {
- // If we are in an arm64/arm64e frame, then the PC should have been signed
- // with the SP
- *referenceAuthedLinkRegister =
- (uint64_t)ptrauth_auth_data((void *)inplaceAuthedLinkRegister,
- ptrauth_key_return_address,
- _registers.__sp);
+ // In arm64e or pauthtest ABI frame, the PC should have been signed with
+ // the SP - resign it with a schema that can be represented with __ptrauth.
+ //
+ // Call the resign builtin explicitly instead of relying on implicit
signing
+ // of the authenticated value on assignment to
*referenceAuthedLinkRegister,
+ // as the latter results in comparison against 0 between auth and sign
+ // operations.
----------------
ojhunt wrote:
What does the ir look like for this sequence? I'm trying to understand where
and why it decides it needs a null check.
https://github.com/llvm/llvm-project/pull/183603
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits