<div class="gmail_quote">On 12 March 2012 19:49, Iain Buclaw <span dir="ltr"><<a href="mailto:ibuclaw@ubuntu.com">ibuclaw@ubuntu.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
OK, -msse2 is not an ARM target option. :~)<br></blockquote><div><br></div><div>Oh sorry, I thought you were asking about the x86 codegen ;)</div><div><br></div><div>I used -S -O2 -float-abi=hard</div><div><br></div><div>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Looking around, the "Procedure Call Standard for the ARM Architecture"<br>
specifically says (section 5.4: Result Return):<br>
<br>
"A Composite Type not larger than 4 bytes is returned in R0."<br>
<br>
"A Composite Type larger than 4 bytes ... is stored in memory at an<br>
address passed as an extra argument when the function was called ..."<br></blockquote><div><br></div><div>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.</div>
<div>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.</div><div>Does GDC understand MRV internally? I know LLVM does at least, but I couldn't find info about GDC.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Feel free to correct me if that document is slightly out of date.<br></blockquote><div> </div><div>Document? :)</div></div>