https://issues.dlang.org/show_bug.cgi?id=20204
Dlang Bot <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #2 from Dlang Bot <[email protected]> --- @ljmf00 created dlang/dlang.org pull request #3120 "spec: abi: clarify calling convention for other architectures other t…" fixing this issue: - spec: abi: clarify calling convention for other architectures other than x86 Observing the assembly generated by the following source file in either DMD and LDC: ```d extern (C) void ccall( size_t a, size_t b, size_t c ); extern (D) void dcall( size_t a, size_t b, size_t c ); //... ccall( a, b, c ); // RDI, RSI, RDX dcall( a, b, c ); // RDX, RSI, RDI ``` The parameters are passed in the reverse order in functions with `extern(D)` linkage. Furthermore, on x86 the calling convention seems to be what is described by the current subsections, not only matching Windows x86, but also appears to be the same behaviour on System V ABI. Fixes #20204 . Signed-off-by: Luís Ferreira <[email protected]> https://github.com/dlang/dlang.org/pull/3120 --
