[PowerPC] Fix small argument stack slot offset for LE
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 20 Jun 2014 16:34:05 +0000 (16:34 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 20 Jun 2014 16:34:05 +0000 (16:34 +0000)
commit69e4786797780c25dbd7820b47998207d44a4d18
tree22780984661719a113e39480266d8ee76a8997e5
parente54c32ebc6b629acf3da91a104623741bb747248
[PowerPC] Fix small argument stack slot offset for LE

When small arguments (structures < 8 bytes or "float") are passed in a
stack slot in the ppc64 SVR4 ABI, they must reside in the least
significant part of that slot.  On BE, this means that an offset needs
to be added to the stack address of the parameter, but on LE, the least
significant part of the slot has the same address as the slot itself.

This changes the PowerPC back-end ABI code to only add the small
argument stack slot offset for BE.  It also adds test cases to verify
the correct behavior on both BE and LE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211368 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelLowering.cpp
test/CodeGen/PowerPC/ppc64-smallarg.ll [new file with mode: 0644]
test/CodeGen/PowerPC/ppc64le-smallarg.ll [new file with mode: 0644]