This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] RFA add dwarf calling convention support
On Thu, 2004-09-30 at 15:30, Richard Henderson wrote:
> On Thu, Sep 30, 2004 at 02:56:17PM -0700, Eric Christopher wrote:
> > + value = targetm.dwarf_calling_convention (type);
> > + if (value)
> > + add_AT_unsigned (subr_die, DW_AT_calling_convention, value);
> > + else
> > + add_AT_unsigned (subr_die, DW_AT_calling_convention, DW_CC_normal);
>
> I had asked for value == 0 to mean "i don't know", which
> should mean "don't add DW_AT_calling_convention".
>
> If we do know, then dwarf_calling_convention should just
> return DW_CC_normal for normal functions.
>
D'oh. Sorry.
> > +int
> > +default_dwarf_calling_convention (tree func ATTRIBUTE_UNUSED)
> > +{
> > + return 0;
> > +}
>
> hook_int_tree_0, since there's nothing about this routine that
> is specific to dwarf or calling conventions at all.
>
OK.
> You may want a hook_dwarf_normal_calling_convention that always
> returns DW_CC_normal, but that's something else.
>
Originally that's what it did and then when I got the other request I
changed it without changing the whole function.
> > +Define this to enable the dwarf attribute DW_AT_calling_convention to
> > +be emitted for each function. Instead of an integer return the enum
> > +value for the DW_CC_ tag.
>
> Need some @code{} markup here.
>
OK.
Thanks.
-eric
--
Eric Christopher <echristo@redhat.com>