This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: x86-64 profiling fix
> Jan,
>
> Jan Hubicka wrote:
>
> >Index: i386.c
> >===================================================================
> >RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.c,v
> >retrieving revision 1.472
> >diff -c -3 -p -r1.472 i386.c
> >*** i386.c 17 Oct 2002 17:09:16 -0000 1.472
> >--- i386.c 17 Oct 2002 17:19:41 -0000
> >*************** x86_field_alignment (field, computed)
> >*** 13949,13954 ****
> >--- 13949,13986 ----
> > return computed;
> > }
> >
> >+ /* Output assembler code to FILE to increment profiler label # LABELNO
> >+ for profiling a function entry. */
> >+ void
> >+ x86_function_profiler (file, labelno)
> >+ FILE *file;
> >+ int labelno;
> >+ {
> >+ if (TARGET_64BIT)
> >+ if (flag_pic)
> >+ {
> >+ fprintf (file, "\tleaq\t%sP%d@(%%rip),%%r11\n",
> >+ LPREFIX, labelno);
> >+ fprintf (file, "\tcall\t*_mcount@GOTPCREL(%%rip)\n");
> >+ }
> >+ else
> >+ {
> >+ fprintf (file, "\tmovq\t$%sP%d,%%r11\n", LPREFIX, labelno);
> >+ fprintf (file, "\tcall\t_mcount\n");
> >+ }
> The above nested if introduces a new warning.
>
> warning: suggest explicit braces to avoid ambiguous `else'
It don't seems to do so for me. I think there has been included patch
to avoid warning when all elses are present so the sequence is not
ambiguous.
Perhaps old bootstrap compiler?
Honza
>
> Graham