[ARM] Fix AAPCS non-compliance caused by very large structs
authorOliver Stannard <oliver.stannard@arm.com>
Fri, 27 Jun 2014 13:59:27 +0000 (13:59 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Fri, 27 Jun 2014 13:59:27 +0000 (13:59 +0000)
commit3f32b9be7f06fa1d89b77f34baacfa7607a3057a
treeb3a0f25139159d9d1c6c7801455731e7db976a50
parent14bd521f4c187d6b7b267a8376ef0f7b492697b5
[ARM] Fix AAPCS non-compliance caused by very large structs

This is a fix to the code in clang which inserts padding arguments to
ensure that the ARM backend can emit AAPCS-VFP compliant code. This code
needs to track the number of registers which have been allocated in order
to do this. When passing a very large struct (>64 bytes) by value, clang
emits IR which takes a pointer to the struct, but the backend converts this
back to passing the struct in registers and on the stack. The bug was that
this was being considered by clang to only use one register, meaning that
there were situations in which padding arguments were incorrectly emitted
by clang.

llvm-svn: 211898
clang/lib/CodeGen/TargetInfo.cpp
clang/test/CodeGen/arm-aapcs-vfp.c