[Issue 20204] need to fix ABI about registers using

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 9 18:01:57 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=20204

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
@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 <contact at lsferreira.net>

https://github.com/dlang/dlang.org/pull/3120

--


More information about the Digitalmars-d-bugs mailing list