llvm-6502/test/CodeGen
Reid Kleckner 805a83c041 Allow sret on the second parameter as well as the first
MSVC always places the implicit sret parameter after the implicit this
parameter of instance methods.  We used to handle this for
x86_thiscallcc by allocating the sret parameter on the stack and leaving
the this pointer in ecx, but that doesn't handle alternative calling
conventions like cdecl, stdcall, fastcall, or the win64 convention.

Instead, change the verifier to allow sret on the second parameter.

This also requires changing the Mips and X86 backends to return the
argument with the sret parameter, instead of assuming that the sret
parameter comes first.

The Sparc backend also returns sret parameters in a register, but I
wasn't able to update it to handle secondary sret parameters.  It
currently calls report_fatal_error if you feed it an sret in the second
parameter.

Reviewers: rafael.espindola, majnemer

Differential Revision: http://reviews.llvm.org/D3617

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208453 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-09 22:32:13 +00:00
..
AArch64
ARM Fix ARM intrinsics-overflow.ll test on Windows 2014-05-09 21:52:48 +00:00
ARM64
CPP
Generic
Hexagon
Inputs
Mips Allow sret on the second parameter as well as the first 2014-05-09 22:32:13 +00:00
MSP430
NVPTX
PowerPC
R600
SPARC Allow sret on the second parameter as well as the first 2014-05-09 22:32:13 +00:00
SystemZ
Thumb
Thumb2
X86 Allow sret on the second parameter as well as the first 2014-05-09 22:32:13 +00:00
XCore