This is the mail archive of the gcc-patches@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: Patch to convert ASM_GLOBALIZE_LABEL to a target hook


 > From: Richard Henderson <rth@redhat.com>
 > 
 > > +static void
 > > +aof_globalize_label (stream, name)
 > > +     FILE *stream;
 > > +     const char *name;
 > > +{
 > > +  default_globalize_label (stream, name);
 > > +  if (! strcmp (name, "main"))
 > > +    arm_main_function = 1;
 > 
 > For the record, this should be using MAIN_NAME_P, not strcmp.
 > And, for how it's used, I'm surprised that 
 > 
 >   emit_library_call (gen_rtx_SYMBOL_REF (Pmode, NAME__MAIN), LCT_NORMAL,
 >                      VOIDmode, 0);
 > 
 > doesn't do the right thing.  Ah well, not your problem.

Ok I left it alone.
(PS: MAIN_NAME_P takes a tree and we have a string here.)


 > > +#ifdef COLLECT
 > > +static void
 > > +ns32k_globalize_label (stream, name)
 > > +     FILE *stream;
 > > +     const char *name;
 > > +{
 > > +  fprintf (stream, "\t.globl\t%s\n", name);
 > > +}
 > > +#endif
 > 
 > How is this different from the default, except in being wrong
 > in not using assemble_name?

Well the whitespacing is different. :-) I dunno.

Going back to revision 1.1 of ns32k.h, it always had a special case
for ASM_OUTPUT_LABEL and ASM_GLOBALIZE_LABEL when COLLECT was defined
which used fprintf instead of assemble_label.  I can either preserve
the differences controlled by COLLECT or nuke them.

Funny thing, COLLECT is defined only by collect2.c *after* we include
config.h, so the code in question is never activated...

Take a look and tell me what to do, click here and search for COLLECT:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ns32k/ns32k.h?rev=1.1&content-type=text/x-cvsweb-markup


 > Ok with those changes.
 > r~

Sure please let me know what to do about the COLLECT thing.

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			Director of Systems Architecture
ghazi@caip.rutgers.edu		Qwest Solutions


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