powerpc64-linux profiling

Alan Modra amodra@bigpond.net.au
Fri Jul 26 03:04:00 GMT 2002


powerpc64-linux doesn't want a reference to a profile label it neither
needs or generates.

	* config/rs6000/rs6000.c (output_profile_hook): Don't generate profile
	label reference when NO_PROFILE_COUNTERS.

OK mainline?

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.348
diff -u -p -r1.348 rs6000.c
--- gcc/config/rs6000/rs6000.c	25 Jul 2002 21:00:10 -0000	1.348
+++ gcc/config/rs6000/rs6000.c	26 Jul 2002 07:10:05 -0000
@@ -11835,10 +11835,13 @@ rs6000_gen_section_name (buf, filename, 
 
 void
 output_profile_hook (labelno)
-     int labelno;
+     int labelno ATTRIBUTE_UNUSED;
 {
   if (DEFAULT_ABI == ABI_AIX)
     {
+#ifdef NO_PROFILE_COUNTERS
+      emit_library_call (init_one_libfunc (RS6000_MCOUNT), 0, VOIDmode, 0);
+#else
       char buf[30];
       const char *label_name;
       rtx fun;
@@ -11849,6 +11880,7 @@ output_profile_hook (labelno)
 
       emit_library_call (init_one_libfunc (RS6000_MCOUNT), 0, VOIDmode, 1,
                          fun, Pmode);
+#endif
     }
   else if (DEFAULT_ABI == ABI_DARWIN)
     {



More information about the Gcc-patches mailing list