Wine's support for reporting calling conventions

Roger Cruz roger_r_cruz at
Wed Jun 6 08:17:05 CDT 2012

  A previous google search did show up someone modifying GCC to add that level of CC info for another architecture so I'm sure it is something that we can do for x86.  I don't know how complex it would be either.  I was hoping it was already done and it was just a matter of a compiler flag.  I guess one more research task for me :-)

 From: Eric Pouech <eric.pouech at>
To: Roger Cruz <roger_r_cruz at> 
Cc: Wine Devel <wine-devel at> 
Sent: Wednesday, June 6, 2012 8:12 AM
Subject: Re: Wine's support for reporting calling conventions
dwarf4 allows each compiler vendor to add its own range of CC values
in the DW_AT_calling_convention field. this means that the vendor must
create its own table for mapping each used CC to a given value.
from a wine standpoint, the list should be rather small (stdcall,
fastcall...) (on top of cdecl of course) (assuming old 16bit code is
out of the game)

AFAIK, gcc only uses those extensions for very dedicated usage (pascal
compiler...). I don't see any reason why one couldn't extend gcc to do
it, but I cannot tell how complex it will be (and if plugins provide
the relevant interface to do so).

2012/6/6, Roger Cruz <roger_r_cruz at>:
> Hi Eric,
> Thanks for replying.  I saw that in the DWARF spec and I was afraid that
> DWARF may not provide detailed Info. But I also read in the spec that the
> compilers use a DWARF extension feature to convey additional info such as
> calling convention for each routine.  Is there a way to coax GCC to output
> that information?  Maybe thru a target plugin?

Eric Pouech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the wine-devel mailing list