[all-commits] [llvm/llvm-project] 2790df: [PAC][CodeGen][ELF][AArch64] Support signed TLSDESC

Daniil Kovalev via All-commits all-commits at lists.llvm.org
Fri Dec 27 04:19:37 PST 2024


  Branch: refs/heads/users/kovdan01/pauth-signed-tlsdesc-codegen
  Home:   https://github.com/llvm/llvm-project
  Commit: 2790df9e6e775f1d3907dda451d51acd0d38c805
      https://github.com/llvm/llvm-project/commit/2790df9e6e775f1d3907dda451d51acd0d38c805
  Author: Daniil Kovalev <dkovalev at accesssoftek.com>
  Date:   2024-12-27 (Fri, 27 Dec 2024)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.h
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    A llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll

  Log Message:
  -----------
  [PAC][CodeGen][ELF][AArch64] Support signed TLSDESC

Support the following relocations and assembly operators:

- `R_AARCH64_AUTH_TLSDESC_ADR_PAGE21` (`:tlsdesc_auth:` for `adrp`)
- `R_AARCH64_AUTH_TLSDESC_LD64_LO12` (`:tlsdesc_auth_lo12:` for `ldr`)
- `R_AARCH64_AUTH_TLSDESC_ADD_LO12` (`:tlsdesc_auth_lo12:` for `add`)

`TLSDESC_AUTH_CALLSEQ` pseudo-instruction is introduced which is later expanded
to actual instruction sequence like the following.

```
adrp  x0, :tlsdesc_auth:var
ldr   x16, [x0, #:tlsdesc_auth_lo12:var]
add   x0, x0, #:tlsdesc_auth_lo12:var
blraa x16, x0
(TPIDR_EL0 offset now in x0)
```

Only SelectionDAG ISel is supported.

Tests starting with 'ptrauth-' have corresponding variants w/o this prefix.


  Commit: dcdbcdd133b329fa33f64ce5a7f57b8fcf785e4b
      https://github.com/llvm/llvm-project/commit/dcdbcdd133b329fa33f64ce5a7f57b8fcf785e4b
  Author: Daniil Kovalev <dkovalev at accesssoftek.com>
  Date:   2024-12-27 (Fri, 27 Dec 2024)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    M llvm/test/CodeGen/AArch64/ptrauth-arm64-tls-dynamics.ll

  Log Message:
  -----------
  Address review comments


Compare: https://github.com/llvm/llvm-project/compare/e04830e3ffea...dcdbcdd133b3

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list