The SPARCv9 ABI returns a float in %f0.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sun, 12 Jan 2014 04:13:17 +0000 (04:13 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sun, 12 Jan 2014 04:13:17 +0000 (04:13 +0000)
commit1655be290cf871f22b1da1fc700ad9e1deab2a01
tree8be8b3e95a4552705c5745ce089e5f1e487923e1
parent86802628de93cd3011e77543e6a7010de12bba87
The SPARCv9 ABI returns a float in %f0.

This is different from the argument passing convention which puts the
first float argument in %f1.

With this patch, all returned floats are treated as if the 'inreg' flag
were set. This means multiple float return values get packed in %f0,
%f1, %f2, ...

Note that when returning a struct in registers, clang will set the
'inreg' flag on the return value, so that behavior is unchanged. This
also happens when returning a float _Complex.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199028 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Sparc/SparcCallingConv.td
lib/Target/Sparc/SparcISelLowering.cpp
test/CodeGen/SPARC/64abi.ll
test/CodeGen/SPARC/64cond.ll
test/CodeGen/SPARC/constpool.ll