Complete formal arguments for the SPARC v9 64-bit ABI.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 6 Apr 2013 18:32:12 +0000 (18:32 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 6 Apr 2013 18:32:12 +0000 (18:32 +0000)
commit1f25fe50236e5842b19198fbfe8a812be0b40cf5
tree73be192b42959ea60b358384e53ac776af232705
parent6e01dcbb7306514f11834f1e8d7d642013ea349b
Complete formal arguments for the SPARC v9 64-bit ABI.

All arguments are formally assigned to stack positions and then promoted
to floating point and integer registers. Since there are more floating
point registers than integer registers, this can cause situations where
floating point arguments are assigned to registers after integer
arguments that where assigned to the stack.

Use the inreg flag to indicate 32-bit fragments of structs containing
both float and int members.

The three-way shadowing between stack, integer, and floating point
registers requires custom argument lowering. The good news is that
return values are passed in the exact same way, and we can share the
code.

Still missing:

 - Update LowerReturn to handle structs returned in registers.
 - LowerCall.
 - Variadic functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178958 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Sparc/SparcCallingConv.td
lib/Target/Sparc/SparcISelLowering.cpp
test/CodeGen/SPARC/64abi.ll [new file with mode: 0644]