Fix mingw32 thiscall + sret.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 3 Dec 2013 20:51:23 +0000 (20:51 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 3 Dec 2013 20:51:23 +0000 (20:51 +0000)
commit21a9fd247ef20f03f6ac8d61daa20d44e39c11b5
tree5730f8e5ab66234d76853cff3fa8a84e7ca68ee8
parent3916f6c45a2bda2e6733a03dc3df67e63187f3eb
Fix mingw32 thiscall + sret.

Unlike msvc, when handling a thiscall + sret gcc will
* Put the sret in %ecx
* Put the this pointer is (%esp)

This fixes, for example, calling stringstream::str.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196312 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86CallingConv.td
test/CodeGen/X86/win32_sret.ll