]> granicus.if.org Git - clang/commit
ARM: use ABI-specified alignment for byval parameters.
authorTim Northover <tnorthover@apple.com>
Mon, 9 Mar 2015 21:40:42 +0000 (21:40 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 9 Mar 2015 21:40:42 +0000 (21:40 +0000)
commit002c12199fd7e6d2e0e80500223f1d8a92b920a6
treeb2cb249bc4e7098ad1d9635fbf6b7799863252d8
parent355459b8779f29f8e2148a113f88bccdf67f9d64
ARM: use ABI-specified alignment for byval parameters.

When passing a type with large alignment byval, we were specifying the type's
alignment rather than the alignment that the backend is actually capable of
producing (ABIAlign).

This would be OK (if odd) assuming the backend dealt with it prooperly,
unfortunately it doesn't and trying to pass types with "byval align 16" can
cause it to set fp incorrectly and trash the stack during the prologue. I'll be
fixing that in a separate patch, but Clang should still be emitting IR that's
as close to its intent as possible.

rdar://20059039

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231706 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/TargetInfo.cpp
test/CodeGen/arm-aapcs-vfp.c
test/CodeGen/arm-arguments.c