llvm-6502/lib
Bill Schmidt 42d43351b2 This patch addresses an ABI compatibility issue with empty aggregate
parameters.  Examples of these are:

  struct { } a;
  union { } b[256];
  int a[0];

An empty aggregate has an address, although dereferencing that address is
pointless.  When passed as a parameter, an empty aggregate does not consume
a protocol register, nor does it consume a doubleword in the parameter save
area.  Passing an empty aggregate by reference passes an address just as
for any other aggregate.  Returning an empty aggregate uses GPR3 as a hidden
address of the return value location, just as for any other aggregate.

The patch modifies PPCTargetLowering::LowerFormalArguments_64SVR4 and
PPCTargetLowering::LowerCall_64SVR4 to properly skip empty aggregate
parameters passed by value.  The handling of return values and by-reference
parameters was already correct.

Built on powerpc64-unknown-linux-gnu and tested with no new regressions.
A test case is included to test proper handling of empty aggregate
parameters on both sides of the function call protocol.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167090 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-31 01:15:05 +00:00
..
Analysis Remove code to saturate profile counts. 2012-10-29 17:27:39 +00:00
Archive Mark checkSignature const, and in turn stop casting away const from 2012-09-05 22:09:23 +00:00
AsmParser Change ForceSizeOpt attribute into MinSize attribute 2012-10-30 16:32:52 +00:00
Bitcode Move the Attributes::Builder outside of the Attributes class and into its own class named AttrBuilder. No functionality change. 2012-10-15 20:35:56 +00:00
CodeGen Change signature of function RAFast::spillAll to avoid conversion between 2012-10-31 00:56:01 +00:00
DebugInfo Reformat and 80-column this. It's not strictly conforming 2012-10-30 21:36:43 +00:00
ExecutionEngine Fix regression in old-style JIT. 2012-10-30 22:21:55 +00:00
Linker Move the "findUsedStructTypes" functionality outside of the Module class. 2012-08-03 00:30:35 +00:00
MC [ms-inline asm] Add support for the TYPE operator. 2012-10-26 18:04:20 +00:00
Object Add interface for querying object files for symbol values. 2012-10-29 10:47:00 +00:00
Support APFloat cleanup: Remove now unused "arithmeticOK" logic. 2012-10-29 18:18:44 +00:00
TableGen Remove exception handling usage from tblgen. 2012-10-25 20:33:17 +00:00
Target This patch addresses an ABI compatibility issue with empty aggregate 2012-10-31 01:15:05 +00:00
Transforms Add support for loops that don't start with Zero. 2012-10-31 00:45:26 +00:00
VMCore Change ForceSizeOpt attribute into MinSize attribute 2012-10-30 16:32:52 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile