[cfe-dev] [LLVMdev] Handling SRet on Windows x86
Chandler Carruth
chandlerc at google.com
Wed Mar 27 20:15:36 PDT 2013
On Wed, Mar 27, 2013 at 2:28 PM, Anton Korobeynikov <asl at math.spbu.ru>wrote:
> Hi Eric,
>
> > From my perspective Win32 is the windows ABI and mingw and cygwin are
> their own ABIs
> No. They are using Windows Platform ABI for almost everything (e.g.
> calling API, C runtime, etc.). At least mingw does. The differences
> are exactly in unspecified area (e.g. passing / returning structs by
> value).
>
> The only difference is C++, where mingw / cygwin follows Itanium ABI
> and MSVC - its own.
>
> > especially as we're not targeting the MSVC abi, it's just the windows
> > abi?
> It seems the proposal patch exactly tries to follow MSVC ABI to keep
> to compatibility :)
>
> So, just to summarize. Windows ABI / calling conventions are more or
> less documented and both mingw / cygwin and msvc follow it.
>
> The differences are in the undocumented area. Both for C and for C++.
>
I don't think anyone disagrees here, but we don't differentiate between C
ABI and C++ ABI in this context really (we don't have two ABI strings in
the triple).
The ABI designator must specifi *both* the C and C++ ABI. As such, mingw
and cygwin have their own holistic ABI -- it is a conjunction of two pieces
of other ABIs.
> And here there is no "Windows ABI" here at all. Because every compiler
> (MSVC, gcc / clang, Borland) does its own stuff. This is why I said
> that the proposal naming is confusing.
>
I don't know anything about Borland, and I don't think that matters. But I
think that the Windows ABI is, and really must be, the ABI followed by the
system compiler: MSVC. That's the standard for the platform, and I think it
is actively confusing to say that the "Windows ABI" could mean anything
other than what MSVC as the standard system compiler does. It certainly
should have nothing to do with mingw or cygwin.
This is why I suggest that the Windows ABI is whatever MSVC happens to do.
The mingw ABI happens to consist of a conjunction of what MSVC does for C
and what GCC on Linux does for C++. That is a unique and different ABI, and
I don't think you can reasonably call it *just* "windows" at any point.
-Chandler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130327/1b1a4a9e/attachment.html>
More information about the cfe-dev
mailing list