1. [Process/NetBSD] Copy changes from FreeBSDRemote and reformat (details)
  2. [PowerPC] Add the LLVM triple for powerpcle [1/5] (details)
  3. [PowerPC] Support powerpcle target in LLVMObject [2/5] (details)
  4. [PowerPC] Support powerpcle target in Clang [3/5] (details)
  5. [PowerPC] Support powerpcle target in LLD [4/5] (details)
  6. [PowerPC] Enable OpenMP for powerpcle target. [5/5] (details)
  7. [PowerPC] NFC: Apply minor clang-format fix (details)
Commit d5317b41c5857df4d4b2a382abcd58b81d2dcb18 by mgorny
[Process/NetBSD] Copy changes from FreeBSDRemote and reformat

Copy changes, including:

- NativeProcessNetBSD::GetLoadedModuleFileSpec()
  and NativeProcessNetBSD::GetFileLoadAddress() methods

- split x86 register sets by CPU extensions

- use offset/size-based register reading/writing

Differential Revision:
The file was modifiedlldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
The file was modifiedlldb/test/API/tools/lldb-server/registers-target-xml-reading/
The file was modifiedlldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
The file was modifiedlldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
The file was modifiedlldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
The file was modifiedlldb/test/API/tools/lldb-server/
The file was modifiedlldb/test/API/python_api/lldbutil/iter/
Commit 8f004471c2a50f0bc03731ebec32aa30de68b61f by bdragon
[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:
The file was modifiedllvm/lib/Support/Triple.cpp
The file was modifiedllvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
The file was modifiedllvm/include/llvm/ADT/Triple.h
The file was modifiedllvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCSubtarget.cpp
The file was modifiedllvm/cmake/config.guess
The file was modifiedllvm/lib/CodeGen/TargetLoweringBase.cpp
The file was modifiedllvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
The file was modifiedllvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp
The file was modifiedllvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCTargetMachine.cpp
The file was modifiedllvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
The file was modifiedllvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.h
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was modifiedllvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
The file was modifiedllvm/unittests/ADT/TripleTest.cpp
Commit 696bd3073fd2fb5b01b88115bddff394c4b44ad5 by bdragon
[PowerPC] Support powerpcle target in LLVMObject [2/5]

Add object file handling for powerpcle-*-*.

Adjust tests.

Reviewed By: MaskRay

Differential Revision:
The file was modifiedllvm/lib/Object/RelocationResolver.cpp
The file was modifiedllvm/test/tools/llvm-objcopy/ELF/binary-output-target.test
The file was modifiedllvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
The file was modifiedllvm/include/llvm/Object/ELFObjectFile.h
The file was modifiedllvm/test/tools/llvm-objdump/ELF/PowerPC/branch-offset.s
The file was modifiedllvm/unittests/Object/ELFObjectFileTest.cpp
Commit 6cee9d0cf896d83fa8f87b7f8d67ae2dfdbc1bf9 by bdragon
[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:
The file was modifiedclang/test/CodeGen/target-data.c
The file was modifiedclang/lib/Sema/SemaChecking.cpp
The file was modifiedclang/lib/CodeGen/TargetInfo.cpp
The file was modifiedclang/lib/Basic/Targets.cpp
The file was modifiedclang/lib/Basic/Targets/PPC.cpp
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/test/Driver/linux-header-search.cpp
The file was modifiedclang/lib/Basic/Targets/OSTargets.h
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/lib/Driver/Driver.cpp
The file was modifiedclang/lib/Driver/ToolChains/Linux.cpp
The file was modifiedclang/lib/Basic/Targets/PPC.h
The file was modifiedclang/lib/Driver/ToolChains/FreeBSD.cpp
The file was modifiedclang/test/CodeGen/altivec.c
The file was modifiedclang/lib/Driver/ToolChain.cpp
The file was modifiedclang/test/Driver/ppc-features.cpp
The file was modifiedclang/test/Driver/ppc-endian.c
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
The file was modifiedclang/test/CodeGen/ppc32-and-aix-struct-return.c
The file was modifiedclang/test/CodeGen/builtins-ppc-altivec.c
Commit 275eb8289c43665bc4ce873535f9960322d16c07 by bdragon
[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:
The file was modifiedlld/ELF/Driver.cpp
The file was modifiedlld/test/ELF/ppc32-gnu-ifunc.s
The file was modifiedlld/ELF/InputFiles.cpp
The file was modifiedlld/test/ELF/ppc32-reloc-rel.s
The file was modifiedlld/ELF/ScriptParser.cpp
The file was modifiedlld/test/ELF/emulation-ppc.s
Commit 2288319733cd5f525bf7e24dece08bfcf9d0ff9e by bdragon
[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:
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPKinds.def
The file was modifiedclang/test/Driver/ppc-features.cpp
The file was modifiedllvm/lib/Frontend/OpenMP/OMPContext.cpp
Commit 4c77a0f1ce6f950805f567ff6505f7c18e62e288 by bdragon
[PowerPC] NFC: Apply minor clang-format fix
The file was modifiedclang/lib/Driver/ToolChains/Linux.cpp