[all-commits] [llvm/llvm-project] 21bfd0: [AArch64] Add support for the GNU ILP32 ABI

Amanieu via All-commits all-commits at lists.llvm.org
Wed Jan 20 05:40:30 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 21bfd068b32ece1c6fbc912208e7cd1782a8c3fc
      https://github.com/llvm/llvm-project/commit/21bfd068b32ece1c6fbc912208e7cd1782a8c3fc
  Author: Amanieu d'Antras <amanieu at gmail.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M llvm/include/llvm/ADT/Triple.h
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/lib/Support/Triple.cpp
    M llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/AArch64Subtarget.h
    M llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
    M llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
    A llvm/test/CodeGen/AArch64/ilp32-tlsdesc.ll
    A llvm/test/CodeGen/AArch64/ilp32-va.ll
    M llvm/test/MC/AArch64/adrp-relocation.s
    M llvm/test/MC/AArch64/arm32-elf-relocs.s
    M llvm/test/MC/AArch64/arm64-elf-reloc-condbr.s
    M llvm/test/MC/AArch64/arm64-ilp32.s
    M llvm/test/MC/AArch64/elf-reloc-ldrlit.s
    M llvm/test/MC/AArch64/elf-reloc-tstb.s
    M llvm/test/MC/AArch64/elf-reloc-uncondbrimm.s
    M llvm/test/MC/AArch64/ilp32-diagnostics.s

  Log Message:
  -----------
  [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




More information about the All-commits mailing list