Multiple return values...

Manu turkeyman at gmail.com
Mon Mar 12 10:59:12 PDT 2012


On 12 March 2012 19:49, Iain Buclaw <ibuclaw at ubuntu.com> wrote:
>
> OK, -msse2 is not an ARM target option. :~)
>

Oh sorry, I thought you were asking about the x86 codegen ;)

I used -S -O2 -float-abi=hard


Looking around, the "Procedure Call Standard for the ARM Architecture"
> specifically says (section 5.4: Result Return):
>
> "A Composite Type not larger than 4 bytes is returned in R0."
>
> "A Composite Type larger than 4 bytes ... is stored in memory at an
> address passed as an extra argument when the function was called ..."
>

Indeed, x86 is the only architecture I know which has this magic 8byte
packing. Every other architecture will be just as bad as ARM by the
standard C ABI.
Something needs to be done about delegates and ranges at the very least, it
would seen GDC just see's these as 8 byte structs being passed around by
value, and only x86 has a hack to improve this.
Does GDC understand MRV internally? I know LLVM does at least, but I
couldn't find info about GDC.


Feel free to correct me if that document is slightly out of date.
>

Document? :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120312/2e14d185/attachment-0001.html>


More information about the Digitalmars-d mailing list