summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2012-10-26 19:59:03 +0000
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>2012-10-26 19:59:03 +0000
commit4a2dcfe5eea2eac447bfd2b4620b69a19ccf0ff2 (patch)
tree589c7b3c1cf8c90312e5623fcbf0aaa1d2891d53 /clang/lib/CodeGen/CodeGenModule.cpp
parentec0fdc93b50456a7e299b858474744692f136f8a (diff)
downloadbcm5719-llvm-4a2dcfe5eea2eac447bfd2b4620b69a19ccf0ff2.tar.gz
bcm5719-llvm-4a2dcfe5eea2eac447bfd2b4620b69a19ccf0ff2.zip
This patch addresses a 64-bit PowerPC ELF ABI compatibility issue with
varargs parameter passing. A strict reading of the ABI indicates that any argument with alignment greater than 8 may require skipping doublewords in the parameter save area to align the argument, and hence require skipping GPRs. In practice, this is not done by GCC. The alignment restriction is used for internal alignment of a structure, but a structure with 16-byte alignment, for example, is not itself 16-byte aligned in the parameter save area. Although this is messy, it has become the de facto standard used in building existing libraries. My initial varargs support followed the ABI language, but not the de facto standard. Running the GCC compatibility test suite exposed this issue, and indeed showed that LLVM didn't pass parameters self-consistently with my original logic. Removing the additional alignment logic allows the affected tests to now pass. I modified the ppc64-varargs-struct.c test case to remove the existing test for generation of alignment code, which is no longer appropriate. Built and tested on powerpc64-unknown-linux-gnu with no new regressions. llvm-svn: 166805
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud