[PowerPC] Generate little-endian object files
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 24 Mar 2014 18:16:09 +0000 (18:16 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 24 Mar 2014 18:16:09 +0000 (18:16 +0000)
commit47eac58333828d7a573eef418fe68e1fe622f977
tree08aaebaf924c46f51fa46dc6844934e4238c8412
parent4768df00c436b8da6357c30071bc3f35820bc2bf
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204634 91177308-0d34-0410-b5e6-96231b3b80d8
24 files changed:
lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h
test/MC/PowerPC/deprecated-p7.s
test/MC/PowerPC/ppc-llong.s
test/MC/PowerPC/ppc-machine.s
test/MC/PowerPC/ppc-nop.s
test/MC/PowerPC/ppc-word.s
test/MC/PowerPC/ppc64-encoding-bookII.s
test/MC/PowerPC/ppc64-encoding-bookIII.s
test/MC/PowerPC/ppc64-encoding-ext.s
test/MC/PowerPC/ppc64-encoding-fp.s
test/MC/PowerPC/ppc64-encoding-vmx.s
test/MC/PowerPC/ppc64-encoding.s
test/MC/PowerPC/ppc64-errors.s
test/MC/PowerPC/ppc64-fixup-apply.s
test/MC/PowerPC/ppc64-fixup-explicit.s
test/MC/PowerPC/ppc64-fixups.s
test/MC/PowerPC/ppc64-initial-cfa.s
test/MC/PowerPC/ppc64-operands.s
test/MC/PowerPC/ppc64-regs.s
test/MC/PowerPC/vsx.s