]> granicus.if.org Git - clang/commit
[PowerPC] Fix small argument stack slot offset for LE
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 20 Jun 2014 16:37:40 +0000 (16:37 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 20 Jun 2014 16:37:40 +0000 (16:37 +0000)
commitd18fdd97d6016357f9a291e976605c661cae5f8d
tree8382363b0c7ea477eb61641b10b3939e6ede75f8
parent926578dfc3c5ab67a15d28a5c794aa9dde3f6f32
[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.

For the most part, this is handled in the LLVM back-end, where I just
fixed the LE case in commit r211368.

However, there is one piece of the clang front-end that is also aware of
these stack-slot offsets: PPC64_SVR4_ABIInfo::EmitVAArg.  This patch
updates that routine to take endianness into account.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211370 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/TargetInfo.cpp
test/CodeGen/ppc64le-varargs-complex.c [new file with mode: 0644]