llvm-project
f9c9f94f - [AArch64] Mark X16 as clobbered in PAUTH_EPILOGUE for hint-based PAuthLR (#175991)

Commit
8 days ago
[AArch64] Mark X16 as clobbered in PAUTH_EPILOGUE for hint-based PAuthLR (#175991) When users request branch protection with PAuthLR on targets that do not support the PAuthLR instructions, the PAUTH_EPILOGUE falls back to using hint-space instructions. This fallback sequence uses X16 as a temporary register, but X16 was not listed in the clobber set. Because Speculative Load Hardening uses X16, this omission made SLH incompatible with this PAUTH_EPILOGUE path. Mark X16 as clobbered so the compiler does not assume X16 is preserved across the epilogue, restoring compatibility with Speculative Load Hardening and avoiding incorrect register liveness assumptions. The clobber is added in C++ rather than TableGen, as X16 is only clobbered when PAuthLR is requested as a branch protection variation and should not be treated as clobbered unconditionally.
Author
Parents
Loading