diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-07-26 01:35:43 +0000 |
---|---|---|
committer | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-07-26 01:35:43 +0000 |
commit | f38cc38fa647d4e72c053c39bbe0cdec1342535f (patch) | |
tree | df4f4c8effb52f7abc5ea69393a45bf20ef3241e /lib/MC | |
parent | fb5b3eaacbc65603b436279300c32512176150fe (diff) | |
download | external_llvm-f38cc38fa647d4e72c053c39bbe0cdec1342535f.zip external_llvm-f38cc38fa647d4e72c053c39bbe0cdec1342535f.tar.gz external_llvm-f38cc38fa647d4e72c053c39bbe0cdec1342535f.tar.bz2 |
[PowerPC] Support powerpc64le as a syntax-checking target.
This patch provides basic support for powerpc64le as an LLVM target.
However, use of this target will not actually generate little-endian
code. Instead, use of the target will cause the correct little-endian
built-in defines to be generated, so that code that tests for
__LITTLE_ENDIAN__, for example, will be correctly parsed for
syntax-only testing. Code generation will otherwise be the same as
powerpc64 (big-endian), for now.
The patch leaves open the possibility of creating a little-endian
PowerPC64 back end, but there is no immediate intent to create such a
thing.
The LLVM portions of this patch simply add ppc64le coverage everywhere
that ppc64 coverage currently exists. There is nothing of any import
worth testing until such time as little-endian code generation is
implemented. In the corresponding Clang patch, there is a new test
case variant to ensure that correct built-in defines for little-endian
code are generated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187179 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCObjectFileInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp index 96b62f1..bcf52d2 100644 --- a/lib/MC/MCObjectFileInfo.cpp +++ b/lib/MC/MCObjectFileInfo.cpp @@ -79,7 +79,8 @@ void MCObjectFileInfo::InitMachOMCObjectFileInfo(Triple T) { // to using it in -static mode. SixteenByteConstantSection = 0; if (RelocM != Reloc::Static && - T.getArch() != Triple::x86_64 && T.getArch() != Triple::ppc64) + T.getArch() != Triple::x86_64 && T.getArch() != Triple::ppc64 && + T.getArch() != Triple::ppc64le) SixteenByteConstantSection = // .literal16 Ctx->getMachOSection("__TEXT", "__literal16", MCSectionMachO::S_16BYTE_LITERALS, @@ -288,7 +289,7 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) { FDEEncoding = dwarf::DW_EH_PE_udata4; TTypeEncoding = dwarf::DW_EH_PE_absptr; } - } else if (T.getArch() == Triple::ppc64) { + } else if (T.getArch() == Triple::ppc64 || T.getArch() == Triple::ppc64le) { PersonalityEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_udata8; LSDAEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_udata8; |