MinGW-w64 runtime library inclusion (Clang-compiled) for proper Win64 support?
kink
noone at nowhere.com
Sat Jun 15 14:12:11 PDT 2013
Of course it is an ABI issue. Since MS doesn't support the x87
type, it obviously isn't mentioned in the Win64 ABI docs. Clang's
ABI assumes it is passed by-val on the stack whereas in LDC we
treat it as a struct > 64 bits and hence pass it by-ref (a
pointer to a private copy for the callee, allocated by the
caller; the Win64 way of passing larger structs by-val). Clang
returns an x87 in the ST(0) x87 register and LDC expects the
result there - perfect. I guess I'll have to modify Clang/LLVM
further to pass x87s by-ref, that seems more appropriate to me.
This shouldn't be a problem for Win32 though as x87s should be
passed ordinarily by-val.
More information about the digitalmars-d-ldc
mailing list