[Issue 2320] New: ABI spec has contradictory information

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 29 08:16:12 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2320

           Summary: ABI spec has contradictory information
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: spec
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: tomas at famolsen.dk


The D ABI spec on how variadic functions are implemented has the two
contradictory sentences: "The caller is expected to clean the stack. _argptr is
not passed, it is computed by the callee."

Only one of these can be fulfilled. I suggest changing the ABI to mandate
passing the variadic arguments as a pointer to the arguments (in the caller's
stack frame).

This is also much more portable, making D easier to implement in a compiler for
more than one architecture. For example, x86-64 does not use the stack for
variadic arguments ...


-- 



More information about the Digitalmars-d-bugs mailing list