diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2014-03-24 18:16:09 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2014-03-24 18:16:09 +0000 |
commit | cae3a17a21fb51de1cab1b729be3bc84101824b8 (patch) | |
tree | 8a0264e9b0e97e8097bf2ad02a79d21fe849f8a1 /llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp | |
parent | 5c65065605e555c82b9e93e5032ab261c2c0456a (diff) | |
download | bcm5719-llvm-cae3a17a21fb51de1cab1b729be3bc84101824b8.tar.gz bcm5719-llvm-cae3a17a21fb51de1cab1b729be3bc84101824b8.zip |
[PowerPC] Generate little-endian object files
As a first step towards real little-endian code generation, this patch
changes the PowerPC MC layer to actually generate little-endian object
files. This involves passing the little-endian flag through the various
layers, including down to createELFObjectWriter so we actually get basic
little-endian ELF objects, emitting instructions in little-endian order,
and handling fixups and relocations as appropriate for little-endian.
The bulk of the patch is to update most test cases in test/MC/PowerPC
to verify both big- and little-endian encodings. (The only test cases
*not* updated are those that create actual big-endian ABI code, like
the TLS tests.)
Note that while the object files are now little-endian, the generated
code itself is not yet updated, in particular, it still does not adhere
to the ELFv2 ABI.
llvm-svn: 204634
Diffstat (limited to 'llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp index fd9c8366829..18609e15b29 100644 --- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp +++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp @@ -48,7 +48,7 @@ PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit, const Triple& T) { if (is64Bit) { PointerSize = CalleeSaveStackSlotSize = 8; } - IsLittleEndian = false; + IsLittleEndian = T.getArch() == Triple::ppc64le; // ".comm align is in bytes but .align is pow-2." AlignmentIsInBytes = false; |