This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Questions about defaults.h ASM_FORMAT_PRIVATE_NAME


On Sun, Sep 01, 2002 at 12:44:18PM -0400, Kaveh R. Ghazi wrote:
> 1.  Aside from some obvious inefficiencies, I was wondering about the
>     call to ASM_GENERATE_INTERNAL_LABEL.  Namely why is it used?

No idea.  No good reason, I suspect.

>     Most
>     (all?) ports define their own version which simply does this:
>     sprintf (BUF, "%s.%d", NAME, NUM).  I.e. without any '*' prefix.

Which should be just fine.  About the only time we can't use this is
when the assembler doesn't like dots in identifiers.  At which point
we can move to '$', and if that is also frowned upon, to "__%d_%s".

> 2.  Given that it must return space allocated by alloca, there's no
>     way to make this into a (target hook) function, right?

Well, there are exactly two users of this macro.  You could change
the interface to use ggc_alloc_string instead.  Especially since we
wind up doing that in both cases immediately after anyway.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]