[Issue 9495] Win64 vararg issue when first argument is > 8 byte
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jan 25 04:17:25 PST 2015
https://issues.dlang.org/show_bug.cgi?id=9495
--- Comment #6 from Benjamin Thaut <code at benjamin-thaut.de> ---
But this is then a completely different issue. The page
https://msdn.microsoft.com/en-us/library/ms235286.aspx states for the Win64
calling convention:
"Any argument that doesn’t fit in 8 bytes, or is not 1, 2, 4, or 8 bytes, must
be passed by reference."
That means the implementation of the argument passing is correct. The issue is
va_start which relies on "format" _not_ beeing passed by reference, which is
clearly not the case for win 64.
For a propper implementation on Win64 you could do:
va_list ap = cast(va_list)_argptr;
I also don't see any way to fix va_start other then maybe inline assembly or
turning it into a compiler intrinsic.
--
More information about the Digitalmars-d-bugs
mailing list