reflection / D's function calling convention?
Chris Miller
chris at dprogramming.com
Wed Nov 1 03:06:25 PST 2006
On Wed, 01 Nov 2006 05:40:18 -0500, Walter Bright
<newshound at digitalmars.com> wrote:
> Thomas Kuehne wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> Is D's functions calling convention somewhere documented?
>
> Not really. It's callee clean stack, args pushed right to left, last arg
> passed in EAX.
Can you please explain some more...
For variadic functions, the caller probably cleans up and the last arg not
put in EAX.
What if the last arg does not fit in EAX; e.g. a char[], is half put in
EAX / half on the stack, or all on the stack?
Return value: EAX, or also I believe EAX and EDX for 64-bit values.
Returning floating point: in floating point register?
Bigger return types probably first push a pointer to a return buffer?
Variadic TypeInfo[] _arguments pushed last or first or something else?
More information about the Digitalmars-d
mailing list