[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)
commitac785122aba50336650c598002c34642754f8af0
tree45e5c436a72001bd1a1be31b429ef863089cabfd
parent03bb1cea0ab13eec44ed7b98db780b47279ffe6b
[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.

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