[Sparc] Fix handling of double incoming arguments on sparc little-endian.
authorJames Y Knight <jyknight@google.com>
Tue, 15 Dec 2015 19:23:12 +0000 (19:23 +0000)
committerJames Y Knight <jyknight@google.com>
Tue, 15 Dec 2015 19:23:12 +0000 (19:23 +0000)
commit33beb24318f9e5355f1aa481cddcbb50eaf2a156
tree52765053c7f094b0917a768baa33bf6b2bef4355
parent6c3b8374522c1c7d8a34306f90eb4b1204d40506
[Sparc] Fix handling of double incoming arguments on sparc little-endian.

On SparcV8, doubles get passed in two 32-bit integer registers. The call
code was already handling endianness correctly, but the incoming
argument code was not -- it got the two halves in opposite order.

Also remove some dead code in LowerFormalArguments_32 to handle
less-than-32bit values, which can't actually happen.

Finally, add some test cases for the 32-bit calling convention, cribbed
from the 64abi.ll test, and run for both big and little-endian.

llvm-svn: 255668
llvm/lib/Target/Sparc/SparcISelLowering.cpp
llvm/test/CodeGen/SPARC/32abi.ll [new file with mode: 0644]