llvm-6502/lib
Bill Schmidt 7a6cb15a92 This patch addresses PR13949.
For the PowerPC 64-bit ELF Linux ABI, aggregates of size less than 8
bytes are to be passed in the low-order bits ("right-adjusted") of the
doubleword register or memory slot assigned to them.  A previous patch
addressed this for aggregates passed in registers.  However, small
aggregates passed in the overflow portion of the parameter save area are
still being passed left-adjusted.

The fix is made in PPCTargetLowering::LowerCall_Darwin_Or_64SVR4 on the
caller side, and in PPCTargetLowering::LowerFormalArguments_64SVR4 on
the callee side.  The main fix on the callee side simply extends
existing logic for 1- and 2-byte objects to 1- through 7-byte objects,
and correcting a constant left over from 32-bit code.  There is also a
fix to a bogus calculation of the offset to the following argument in
the parameter save area.

On the caller side, again a constant left over from 32-bit code is
fixed.  Additionally, some code for 1, 2, and 4-byte objects is
duplicated to handle the 3, 5, 6, and 7-byte objects for SVR4 only.  The
LowerCall_Darwin_Or_64SVR4 logic is getting fairly convoluted trying to
handle both ABIs, and I propose to separate this into two functions in a
future patch, at which time the duplication can be removed.

The patch adds a new test (structsinmem.ll) to demonstrate correct
passing of structures of all seven sizes.  Eight dummy parameters are
used to force these structures to be in the overflow portion of the
parameter save area.

As a side effect, this corrects the case when aggregates passed in
registers are saved into the first eight doublewords of the parameter
save area:  Previously they were stored left-justified, and now are
properly stored right-justified.  This requires changing the expected
output of existing test case structsinregs.ll.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166022 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-16 13:30:53 +00:00
..
Analysis Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis. 2012-10-15 16:24:29 +00:00
Archive Mark checkSignature const, and in turn stop casting away const from 2012-09-05 22:09:23 +00:00
AsmParser 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
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 Issue: 2012-10-16 07:16:47 +00:00
DebugInfo Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. 2012-09-18 02:01:41 +00:00
ExecutionEngine Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis. 2012-10-15 16:24:29 +00:00
Linker Move the "findUsedStructTypes" functionality outside of the Module class. 2012-08-03 00:30:35 +00:00
MC [ms-inline asm] If we parsed a statement and the opcode is valid, then it's an instruction. 2012-10-15 19:08:18 +00:00
Object Cosmetic changes 2012-10-10 01:45:52 +00:00
Support Add powerpc-ibm-aix to Triple. Patch by Kai. 2012-10-12 11:08:57 +00:00
TableGen tblgen: Compile TableGen without RTTI. 2012-10-10 20:27:18 +00:00
Target This patch addresses PR13949. 2012-10-16 13:30:53 +00:00
Transforms Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change. 2012-10-16 05:23:31 +00:00
VMCore Cleanup whitespace. 2012-10-16 06:10:45 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile