[Issue 1066] New: Variadic arguments being passed in registers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 16 18:02:32 PDT 2007


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

           Summary: Variadic arguments being passed in registers
           Product: DGCC aka GDC
           Version: 0.23
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn at users.sf.net
        ReportedBy: madou at madou.org


On several architectures, optional arguments to variadic functions get passed
in registers, just like regular arguments. This prevents the use of _argptr,
among others. In our opinion (my own and that of several Tango library
developers), even if the platform ABI dictates the use of registers for
variadic arguments, this approach should only ever be taken for extern (C)
functions. D functions are better off using stack-borne varargs, for the reason
mentioned above, and also since register based varargs incur a heavy
performance penalty due to most platforms' inability to dynamically index their
register files.


-- 



More information about the D.gnu mailing list