[cfe-dev] [LLVMdev] Handling SRet on Windows x86

Timur Iskhodzhanov timurrrr at google.com
Tue Mar 26 19:26:31 PDT 2013


Anton,

What do you think?

2013/3/20 Eric Christopher <echristo at gmail.com>:
>
>
>
> On Wed, Mar 20, 2013 at 5:21 PM, Timur Iskhodzhanov <timurrrr at google.com>
> wrote:
>>
>> 2013/3/20 Timur Iskhodzhanov <timurrrr at google.com>:
>> > Anton,
>> >
>> > [+Eric, Nick,
>> > the e-mail thread context has been broken a few times, so you should
>> > probably look at the llvmdev archives.
>> > It all starts here:
>> > http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-October/053961.html ]
>> >
>> > So I've decided to make a new attempt to fix this issue.
>> >
>> > We've discussed my patches with Eric and came up with the following
>> > idea:
>> > a) IsTargetWindows should be true for all the targets that execute on
>> > the Windows kernel, including Cygwin, MinGW and MSVC ABIs.
>> >
>> > However, "Windows 32-bit ABI" usually implies "MSVC 32-bit ABI", so
>> > it's Cygwin and MinGW (that are similar more similar to Itanium ABI
>> > than to MSVC ABI) that should be exceptions from the general Win32
>> > handling code.
>> >
>> > That is,
>> > b) We should add a IsTargetWin32 which is true if the MSVC 32-bit ABI
>> > is used and false for Cygwin+MinGW.
>> FTR, there's already such a method but it is (mis?)used only in
>> lib/Target/X86/X86FrameLowering.cpp for segmented stacks.
>> Are segmented stacks actually used with MSVC or is it just the
>> conditions there should use isTargetMingw() && !is64Bit() instead?

Attached is a patch that makes the proposed change to isTargetWin32
and also fixes all the previous uses of isTargetWin32.
Can you please review it?

--
Thanks,
Timur

> cc'ing graydon about segmented stacks because I know rust uses them.
>
> -eric
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_15556_p0.patch
Type: application/octet-stream
Size: 2391 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130326/ac43c5ae/attachment.obj>


More information about the cfe-dev mailing list