Thread overview
[Issue 2299] New: the ABI documentation for registry convention does not include IA-64 platform
Aug 20, 2008
d-bugmail
Aug 26, 2008
d-bugmail
Aug 11, 2011
Trass3r
Jan 22, 2012
Walter Bright
August 20, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2299

           Summary: the ABI documentation for registry convention does not
                    include IA-64 platform
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: manlio.perillo@gmail.com


The ABI documentation for registry convention says that:

long and ulong are returned in EDX,EAX, where EDX gets the most significant half.

However this is only true for IA-32 architecture.
For IA-64 architecture long and ulong are returned in RAX.

NOTE: I have not checked if this is true, but tango.Atomic.atomicIncrement assume this is true


-- 

August 20, 2008
<d-bugmail@puremagic.com> wrote in message news:bug-2299-3@http.d.puremagic.com/issues/...
> http://d.puremagic.com/issues/show_bug.cgi?id=2299
>
>           Summary: the ABI documentation for registry convention does not
>                    include IA-64 platform
>           Product: D
>           Version: unspecified
>          Platform: PC
>        OS/Version: Linux
>            Status: NEW
>          Severity: normal
>          Priority: P2
>         Component: www.digitalmars.com
>        AssignedTo: bugzilla@digitalmars.com
>        ReportedBy: manlio.perillo@gmail.com
>
>
> The ABI documentation for registry convention says that:
>
> long and ulong are returned in EDX,EAX, where EDX gets the most
> significant
> half.
>
> However this is only true for IA-32 architecture.
> For IA-64 architecture long and ulong are returned in RAX.
>
> NOTE: I have not checked if this is true, but tango.Atomic.atomicIncrement assume this is true

The ABI does not give any heed to 64-bit platforms.  Or non-x86 platforms. In that case, I'm not sure that the ABI is right or wrong.  The only 64-bit D compiler in existence right now is GDC, and it is technically nonconformant as it always uses the C calling convention.


August 26, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2299





------- Comment #1 from bugzilla@digitalmars.com  2008-08-26 02:08 -------
The assembler part of the ABI document is for the 32 bit x86 architecture, it does not address other architectures.


-- 

August 11, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=2299


Trass3r <mrmocool@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |spec
                 CC|                            |mrmocool@gmx.de


--- Comment #2 from Trass3r <mrmocool@gmx.de> 2011-08-10 19:05:50 PDT ---
Now that x64 is supported by dmd, could the ABI document be updated to
accommodate that?
btw currently structs of size 16 bytes are passed via a hidden parameter rather
than in 2 registers. Maybe even more registers could be used since there are
more available.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 22, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=2299



--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> 2012-01-22 02:38:49 PST ---
Some improvements to the ABI page:

https://github.com/D-Programming-Language/d-programming-language.org/commit/128f6bd7a4e8879a510d2364a96f2731375bc6f4

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------