This fell out of my inbox...

On Mon, Mar 31, 2014 at 1:19 AM, Yaron Keren <[email protected]> wrote:

> OK, I followed the code path and indeed dwarf exceptions are disabled due
> to the wrong X86MCAsmInfo being selected.
> Corrections to restore pre-r204978 functionality for X86MCTargetDesc
> committed in r205170.
>
> Back to TargetInfo.cpp:6204. Tracing the code
>
>     bool IsWin32FloatStructABI = Triple.isWindowsMSVCEnvironment();
> [pre r204977 the code was = (Triple.getOS() == llvm::Triple::Win32) ]
>
> shows that IsWin32*FloatStruct*ABI is used to set IsWin32*Struct*ABI
> in X86_32ABIInfo constructor in TargetInfo.cpp:582.
>
> The different descriptions in names, FloatStruct vs. Struct may indicate a
> problem as IsWin32StructABI applies to several conditions more than just
> passing floats around.
>

IMO we should rename IsWin32FloatStructABI to IsWin32StructABI.  Or
refactor the code altogether to split out the different OS variants of
x86_32.  Or sink the OS down into X86_32ABIInfo.  Anything would be better,
really.

I have plans to change the C++ ABI layering here.  I want the ABIInfo
subclasses delegate out to CGCXXABI, which can optionally dictate how
return values and parameters are passed.  If the C++ ABI doesn't say
anything, we fall back to the C ABI rules covered by ABIInfo subclasses.
 That should simplify the code a bit.


> Moreover, isn't MinGW is C ABI compatible with Visual C++? If so,
> shouldn't this test apply to MinGW as well?
>

MinGW isn't C ABI compatible with MSVC when passing or returning structs by
value.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to