Jacob Carlborg wrote:
On 2012-10-04 14:36, Alex Rønne Petersen wrote:

Presumably speed; returning small structs in registers will be faster
than doing so on the stack.

Are sturcts currently always returned on the stack?

From: http://dlang.org/abi.html, for Windows x86 extern(D):

* 1, 2 and 4 byte structs are returned in EAX.
* 8 byte structs are returned in EDX,EAX, where EDX gets the most significant half. * For other struct sizes, the return value is stored through a hidden pointer passed as an argument to the function.

Reply via email to