Windows X64 Calling conventions

kinke via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Apr 20 01:36:32 PDT 2017


On Thursday, 20 April 2017 at 01:16:11 UTC, Tofu Ninja wrote:
> My question is, why is it passed twice, both in xmm0 and rcx? 
> The MSDN docs say floating point are passed in xmm registers, 
> why is it also copied in into rcx? Is it necessary for anything?

That is only required for variadics, quoting MSDN 
[https://msdn.microsoft.com/en-us/library/dd2wa36c.aspx]:
> For floating-point values only, both the integer and the
> floating-point register will contain the float value in case
> the callee expects the value in the integer registers.


More information about the Digitalmars-d-learn mailing list