Fix handling of vaargs on PPC32 when going from regsave to overflow.
authorRoman Divacky <rdivacky@freebsd.org>
Sat, 20 Feb 2016 08:31:24 +0000 (08:31 +0000)
committerRoman Divacky <rdivacky@freebsd.org>
Sat, 20 Feb 2016 08:31:24 +0000 (08:31 +0000)
commit039b970c97cf557b2bdb0fb72188cedb8fff31ad
tree56d324a1aa83758be51204c2c244c8794081b881
parent43b121df05b2e0c621452dddcb8f553468d59c53
Fix handling of vaargs on PPC32 when going from regsave to overflow.

It can happen that when we only have 1 more register left in the regsave
area we need to store a value bigger than 1 register and therefore we
go to the overflow area. In this case we have to leave the last slot
in the regsave area unused and keep using overflow area. Do this
by storing a limit value to the used register counter in the overflow block.

Issue diagnosed by and solution tested by Mark Millard!

llvm-svn: 261422
clang/lib/CodeGen/TargetInfo.cpp
clang/test/CodeGen/ppc-varargs-struct.c