[all-commits] [llvm/llvm-project] 8f0044: [PowerPC] Add the LLVM triple for powerpcle [1/5]

Brandon Bergren via All-commits all-commits at lists.llvm.org
Sat Jan 2 10:25:12 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8f004471c2a50f0bc03731ebec32aa30de68b61f
      https://github.com/llvm/llvm-project/commit/8f004471c2a50f0bc03731ebec32aa30de68b61f
  Author: Brandon Bergren <bdragon at FreeBSD.org>
  Date:   2021-01-02 (Sat, 02 Jan 2021)

  Changed paths:
    M llvm/cmake/config.guess
    M llvm/include/llvm/ADT/Triple.h
    M llvm/lib/CodeGen/TargetLoweringBase.cpp
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
    M llvm/lib/Support/Triple.cpp
    M llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
    M llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
    M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
    M llvm/lib/Target/PowerPC/PPCSubtarget.cpp
    M llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
    M llvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp
    M llvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.h
    M llvm/unittests/ADT/TripleTest.cpp

  Log Message:
  -----------
  [PowerPC] Add the LLVM triple for powerpcle [1/5]

Add a triple for powerpcle-*-*.

This is a little-endian encoding of the 32-bit PowerPC ABI, useful in certain niche situations:

1) A loader such as the FreeBSD loader which will be loading a little endian kernel. This is required for PowerPC64LE to load properly in pseries VMs.
Such a loader is implemented as a freestanding ELF32 LSB binary.

2) Userspace emulation of a 32-bit LE architecture such as x86 on 64-bit hosts such as PowerPC64LE with tools like box86 requires having a 32-bit LE toolchain and library set, as they operate by translating only the main binary and switching to native code when making library calls.

3) The Void Linux for PowerPC project is experimenting with running an entire powerpcle userland.

Reviewed By: MaskRay

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


  Commit: 696bd3073fd2fb5b01b88115bddff394c4b44ad5
      https://github.com/llvm/llvm-project/commit/696bd3073fd2fb5b01b88115bddff394c4b44ad5
  Author: Brandon Bergren <bdragon at FreeBSD.org>
  Date:   2021-01-02 (Sat, 02 Jan 2021)

  Changed paths:
    M llvm/include/llvm/Object/ELFObjectFile.h
    M llvm/lib/Object/RelocationResolver.cpp
    M llvm/test/tools/llvm-objcopy/ELF/binary-output-target.test
    M llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
    M llvm/test/tools/llvm-objdump/ELF/PowerPC/branch-offset.s
    M llvm/unittests/Object/ELFObjectFileTest.cpp

  Log Message:
  -----------
  [PowerPC] Support powerpcle target in LLVMObject [2/5]

Add object file handling for powerpcle-*-*.

Adjust tests.

Reviewed By: MaskRay

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


  Commit: 6cee9d0cf896d83fa8f87b7f8d67ae2dfdbc1bf9
      https://github.com/llvm/llvm-project/commit/6cee9d0cf896d83fa8f87b7f8d67ae2dfdbc1bf9
  Author: Brandon Bergren <bdragon at FreeBSD.org>
  Date:   2021-01-02 (Sat, 02 Jan 2021)

  Changed paths:
    M clang/lib/Basic/Targets.cpp
    M clang/lib/Basic/Targets/OSTargets.h
    M clang/lib/Basic/Targets/PPC.cpp
    M clang/lib/Basic/Targets/PPC.h
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/CodeGen/TargetInfo.cpp
    M clang/lib/Driver/Driver.cpp
    M clang/lib/Driver/ToolChain.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/lib/Driver/ToolChains/FreeBSD.cpp
    M clang/lib/Driver/ToolChains/Gnu.cpp
    M clang/lib/Driver/ToolChains/Linux.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/CodeGen/altivec.c
    M clang/test/CodeGen/builtins-ppc-altivec.c
    M clang/test/CodeGen/ppc32-and-aix-struct-return.c
    M clang/test/CodeGen/target-data.c
    M clang/test/Driver/linux-header-search.cpp
    M clang/test/Driver/ppc-endian.c
    M clang/test/Driver/ppc-features.cpp

  Log Message:
  -----------
  [PowerPC] Support powerpcle target in Clang [3/5]

Add powerpcle support to clang.

For FreeBSD, assume a freestanding environment for now, as we only need it in the first place to build loader, which runs in the OpenFirmware environment instead of the FreeBSD environment.

For Linux, recognize glibc and musl environments to match current usage in Void Linux PPC.

Adjust driver to match current binutils behavior regarding machine naming.

Adjust and expand tests.

Reviewed By: MaskRay

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


  Commit: 275eb8289c43665bc4ce873535f9960322d16c07
      https://github.com/llvm/llvm-project/commit/275eb8289c43665bc4ce873535f9960322d16c07
  Author: Brandon Bergren <bdragon at FreeBSD.org>
  Date:   2021-01-02 (Sat, 02 Jan 2021)

  Changed paths:
    M lld/ELF/Driver.cpp
    M lld/ELF/InputFiles.cpp
    M lld/ELF/ScriptParser.cpp
    M lld/test/ELF/emulation-ppc.s
    M lld/test/ELF/ppc32-gnu-ifunc.s
    M lld/test/ELF/ppc32-reloc-rel.s

  Log Message:
  -----------
  [PowerPC] Support powerpcle target in LLD [4/5]

Add support for linking powerpcle code in LLD.

Rewrite lld/test/ELF/emulation-ppc.s to use a shared check block and add powerpcle tests.

Update tests.

Reviewed By: MaskRay

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


  Commit: 2288319733cd5f525bf7e24dece08bfcf9d0ff9e
      https://github.com/llvm/llvm-project/commit/2288319733cd5f525bf7e24dece08bfcf9d0ff9e
  Author: Brandon Bergren <bdragon at FreeBSD.org>
  Date:   2021-01-02 (Sat, 02 Jan 2021)

  Changed paths:
    M clang/test/Driver/ppc-features.cpp
    M llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
    M llvm/lib/Frontend/OpenMP/OMPContext.cpp

  Log Message:
  -----------
  [PowerPC] Enable OpenMP for powerpcle target. [5/5]

Enable OpenMP for powerpcle to match the rest of powerpc*.

Update tests.

Reviewed By: MaskRay

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


Compare: https://github.com/llvm/llvm-project/compare/d5317b41c585...2288319733cd


More information about the All-commits mailing list