[LLVMdev] MinGW/MSVC++ uses different ABI for sret

Eli Friedman eli.friedman at gmail.com
Fri Sep 25 16:50:32 PDT 2009

On Fri, Sep 25, 2009 at 2:41 PM, Óscar Fuentes <ofv at wanadoo.es> wrote:
> I filed a bug yesterday ( http://llvm.org/bugs/show_bug.cgi?id=5046 )
> and Anton kindly explained that LLVM is doing the right thing as per the
> ABI (the GCC ABI, I'll add).
>  1. Is there a LLVM way of dealing with this without using separate code
>  for VC++ and GCC?

I'm not sure what you mean... LLVM can distinguish between MinGW and
MSVC targets.   If we want to, it shouldn't be too hard to make
X86TargetLowering::LowerFormalArguments and
X86TargetLowering::LowerCall account for the difference.

>  3. Is a bug that LLVM does not distinguish among GCC and VC++ sret
>  handling?

Probably... see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36834 .


More information about the llvm-dev mailing list