Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AArch64] Indirect tail-calls cannot use x16 with pac-ret+pc #81020

Merged
merged 3 commits into from
Feb 8, 2024

Commits on Feb 7, 2024

  1. [AArch64] Indirect tail-calls cannot use x16 with pac-ret+pc

    When using -mbranch-protection=pac-ret+pc, x16 is used in the function
    epilogue to hold the address of the signing instruction. This is used by
    a HINT instruction which can only use x16, so we can't change this. This
    means that we can't use it to hold the function pointer for an indirect
    tail-call.
    
    There is existing code to force indirect tail-calls to use x16 or x17
    when BTI is enabled, so there are now 4 combinations:
    
    bti  pac-ret+pc  Valid function pointer registers
    off  off         Any non callee-saved register
    on   off         x16 or x17
    off  on          Any non callee-saved register except x16
    on   on          x17
    ostannard committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    b88f2fa View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2024

  1. clang-format

    ostannard committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    73295d7 View commit details
    Browse the repository at this point in the history
  2. Remove line breaks in predicate

    The line breaks cause debug builds to fail, because these strings get
    put into single-line comments in AArch64GenDAGIsel.inc.
    ostannard committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    6758bbb View commit details
    Browse the repository at this point in the history