[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)
commit59c6ab20d64a6705ae027ba8f2226a1e1fe5065e
treed3281fee07727c44ca20346ee04503d9d222ef89
parentd30a1f2cb2a5e60eb130b461337cdf9f4d63a606
[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.

llvm-svn: 211368
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/ppc64-smallarg.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/ppc64le-smallarg.ll [new file with mode: 0644]