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

Óscar Fuentes ofv at wanadoo.es
Fri Sep 25 18:28:32 PDT 2009


Óscar Fuentes <ofv at wanadoo.es> writes:

> BTW, it's even worse, as aggregates passed by value are, well... passed
> by value, contrary to the 386 unix ABI which uses pointers. I'm afraid
> that this has no so easy solution as the sret issue. Is there any LLVM
> target where aggregates are "really" passed by value?

This is not entirely true. MSVC never uses pointers for passing a
class/struct by value; GCC uses a pointer if the class/struct is not a
POD.

This is listed on http://www.agner.org/optimize/calling_conventions.pdf
page 19.

-- 
Óscar




More information about the llvm-dev mailing list