This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
(ping) PATCH - rs6000.c, RS6000_MCOUNT and SVR4 pic
ping
----- Original Message -----
From: "Graeme Peterson" <gp@qnx.com>
To: <gcc-patches@gcc.gnu.org>; <gp@qnx.com>
Sent: Tuesday, February 24, 2004 12:57 PM
Subject: Re: PATCH - rs6000.c, RS6000_MCOUNT and SVR4 pic
> Oh, here is the thread from the gcc list.
>
> http://gcc.gnu.org/ml/gcc/2004-02/msg01103.html
>
> GP
>
> ----- Original Message -----
> From: <gp@qnx.com>
> To: <gcc-patches@gcc.gnu.org>
> Sent: Monday, February 23, 2004 4:36 PM
> Subject: PATCH - rs6000.c, RS6000_MCOUNT and SVR4 pic
>
>
> > Hi. I have verified this fix in gcc-2.95.3 and gcc-3.3.1 for QNX
Neutrino
> > PPC, but I do not have a way to properly verify it for the head branch,
or
> > for other OS targets.
> >
> > I noticed that profiling failed with ppc shared objects, so I changed
the
> > following line in output_function_profiler() for ABI_V4 in rs6000.c:
> >
> > fprintf (file, "\tbl %s\n", RS6000_MCOUNT);
> >
> > to:
> >
> > if (flag_pic)
> > fprintf (file, "\tbl %s@plt\n", RS6000_MCOUNT);
> > else
> > fprintf (file, "\tbl %s\n", RS6000_MCOUNT);
> >
> > Could someone give it a go, and let me know if it seems right? I got a
> > preliminary vote of approval from Jim Wilson on the gcc list.
> >
> > If it works and seems right, I'll post a ChangeLog entry for final
> approval
> > before committing.
> >
> > Thanks.
> > GP
> >
> >
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
> > Index: rs6000.c
> > ===================================================================
> > RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
> > retrieving revision 1.598
> > diff -c -3 -p -r1.598 rs6000.c
> > *** rs6000.c 23 Feb 2004 18:40:46 -0000 1.598
> > --- rs6000.c 23 Feb 2004 20:18:34 -0000
> > *************** output_function_profiler (FILE *file, in
> > *** 13681,13687 ****
> > }
> >
> > /* ABI_V4 saves the static chain reg with ASM_OUTPUT_REG_PUSH.
*/
> > ! fprintf (file, "\tbl %s\n", RS6000_MCOUNT);
> > break;
> >
> > case ABI_AIX:
> > --- 13681,13690 ----
> > }
> >
> > /* ABI_V4 saves the static chain reg with ASM_OUTPUT_REG_PUSH.
*/
> > ! if (flag_pic)
> > ! fprintf (file, "\tbl %s@plt\n", RS6000_MCOUNT);
> > ! else
> > ! fprintf (file, "\tbl %s\n", RS6000_MCOUNT);
> > break;
> >
> > case ABI_AIX:
> >
>