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] Fix mcount profiling on mips


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.


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