HomePhabricator

[AArch64] Add support for the GNU ILP32 ABI

Authored by Amanieu on Jan 20 2021, 5:30 AM.

Description

[AArch64] Add support for the GNU ILP32 ABI

Add the aarch64[_be]-*-gnu_ilp32 targets to support the GNU ILP32 ABI for AArch64.

The needed codegen changes were mostly already implemented in D61259, which added support for the watchOS ILP32 ABI. The main changes are:

  • Wiring up the new target to enable ILP32 codegen and MC.
  • ILP32 va_list support.
  • ILP32 TLSDESC relocation support.

There was existing MC support for ELF ILP32 relocations from D25159 which could be enabled by passing "-target-abi ilp32" to llvm-mc. This was changed to check for "gnu_ilp32" in the target triple instead. This shouldn't cause any issues since the existing support was slightly broken: it was generating ELF64 objects instead of the ELF32 object files expected by the GNU ILP32 toolchain.

This target has been tested by running the full rustc testsuite on a big-endian ILP32 system based on the GCC ILP32 toolchain.

Reviewed By: kristof.beyls

Differential Revision: https://reviews.llvm.org/D94143

Details

Committed
AmanieuJan 20 2021, 5:34 AM
Reviewer
kristof.beyls
Differential Revision
D94143: [AArch64] Add support for the GNU ILP32 ABI
Parents
rG5d718374a68f: [SCEV] Add a test with wrong exit counts. (NFC)
Branches
Unknown
Tags
Unknown