Skip to content

Conversation

@john-brawn-arm
Copy link
Collaborator

Most pacbti instructions are a nop when the target does not have pacbti, and thus safe to execute, but bxaut is an undefined instruction. When we don't have pacbti (e.g. if we're compiling compiler-rt with -mbranch-protection=standard in order to be forward-compatible with pacbti while still working on targets without it) then we need to use separate aut and bx instructions.

Most pacbti instructions are a nop when the target does not have
pacbti, and thus safe to execute, but bxaut is an undefined
instruction. When we don't have pacbti (e.g. if we're compiling
compiler-rt with -mbranch-protection=standard in order to be
forward-compatible with pacbti while still working on targets without
it) then we need to use separate aut and bx instructions.
Copy link
Member

@vhscampos vhscampos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@smithp35 smithp35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too. Good to have an option to only use the hint space.

@john-brawn-arm john-brawn-arm merged commit ec1c73b into llvm:main Jun 27, 2025
10 checks passed
@john-brawn-arm john-brawn-arm deleted the bxaut branch June 27, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants