On 2008 Dec 11, at 10:28, Mauricio wrote:
and obviously a C compiler is entitled to return a small struct
in registers if it feels like it.

If a compiler is compiling code that calls a library, how is it
supposed to know if a return pointer is been passed as a register
or by using a pointer? The compiler may not have access to the

The rules are specified as part of an ABI. There is a default ABI for a platform, or you can use a special one (document it). IIRC some CPUs allow information about passed/returned values to be passed in a flag word.

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university    KF8NH


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to