This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix mcount profiling on mips
- From: Eric Christopher <echristo at redhat dot com>
- To: Daniel Jacobowitz <dmj+ at andrew dot cmu dot edu>
- Cc: thorpej at wasabisystems dot com, gcc-patches at gcc dot gnu dot org
- Date: 01 Feb 2002 19:54:30 -0800
- Subject: Re: [patch] Fix mcount profiling on mips
- References: <20020115095538.Y542@dr-evil.shagadelic.org><20020115131651.A8251@nevyn.them.org><20020115165239.D21293@dr-evil.shagadelic.org><200201160824.AAA00786@cygnus.com> <20020116093408.A31160@nevyn.them.org><1011228166.23219.156.camel@ghostwheel.cygnus.com><20020116194659.A30402@nevyn.them.org><1011228624.23176.169.camel@ghostwheel.cygnus.com> <20020116200044.A30685@nevyn.them.org>
This has been checked in.
-eric
> > > I don't have write access; please commit this? I've had the glibc part
> > > working since when I last looked at this issue, and I just need to nag
> > > Andreas J. to get it in. I'll do that.
> >
> > Ok. Can you give me the precise diff you want checked in please? :)
>
> Here's what I've got.
>
> --
> Daniel Jacobowitz Carnegie Mellon University
> MontaVista Software Debian GNU/Linux Developer
>
> Index: linux.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/mips/linux.h,v
> retrieving revision 1.33
> diff -u -r1.33 linux.h
> --- linux.h 2001/11/19 11:28:52 1.33
> +++ linux.h 2002/01/17 00:59:53
> @@ -283,3 +283,9 @@
> /* Tell function_prologue in mips.c that we have already output the .ent/.end
> pseudo-ops. */
> #define FUNCTION_NAME_ALREADY_DECLARED
> +
> +/* The glibc _mcount stub will save $v0 for us. Don't mess with saving
> + it, since ASM_OUTPUT_REG_PUSH/ASM_OUTPUT_REG_POP do not work in the
> + presence of $gp-relative calls. */
> +#undef ASM_OUTPUT_REG_PUSH
> +#undef ASM_OUTPUT_REG_POP
> Index: mips.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.h,v
> retrieving revision 1.148
> diff -u -r1.148 mips.h
> --- mips.h 2002/01/16 02:37:30 1.148
> +++ mips.h 2002/01/17 00:59:54
> @@ -2759,18 +2759,16 @@
> { \
> if (TARGET_MIPS16) \
> sorry ("mips16 function profiling"); \
> - fprintf (FILE, "\t.set\tnoreorder\n"); \
> fprintf (FILE, "\t.set\tnoat\n"); \
> fprintf (FILE, "\tmove\t%s,%s\t\t# save current return address\n", \
> reg_names[GP_REG_FIRST + 1], reg_names[GP_REG_FIRST + 31]); \
> - fprintf (FILE, "\tjal\t_mcount\n"); \
> fprintf (FILE, \
> "\t%s\t%s,%s,%d\t\t# _mcount pops 2 words from stack\n", \
> TARGET_64BIT ? "dsubu" : "subu", \
> reg_names[STACK_POINTER_REGNUM], \
> reg_names[STACK_POINTER_REGNUM], \
> Pmode == DImode ? 16 : 8); \
> - fprintf (FILE, "\t.set\treorder\n"); \
> + fprintf (FILE, "\tjal\t_mcount\n"); \
> fprintf (FILE, "\t.set\tat\n"); \
> }
>
--
I will not use abbrev.