[PATCH]: Fix -p profiling for HC11/HC12

Stephane Carrez Stephane.Carrez@worldnet.fr
Thu Nov 15 03:07:00 GMT 2001


Hi!

When using gcc -p with 68hc11, the label generated for mcount is not correct
and it results in a link error.  I've committed this patch on 3_0 and 3_1
to use the good label (missing . :-).

	Stephane

2001-11-25  Stephane Carrez  <Stephane.Carrez@worldnet.fr>

	* config/m68hc11/m68hc11.h (FUNCTION_PROFILER): Fix label name
	passed to mcount.
-------------- next part --------------
Index: config/m68hc11/m68hc11.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68hc11/m68hc11.h,v
retrieving revision 1.25
diff -u -p -r1.25 m68hc11.h
--- m68hc11.h	2001/11/22 02:19:53	1.25
+++ m68hc11.h	2001/11/25 16:24:33
@@ -1130,7 +1130,7 @@ typedef struct m68hc11_args
 /* Output assembler code to FILE to increment profiler label # LABELNO
    for profiling a function entry.  */
 #define FUNCTION_PROFILER(FILE, LABELNO)		\
-    asm_fprintf (FILE, "\tldy LP%d\n\tjsr mcount\n", (LABELNO))
+    asm_fprintf (FILE, "\tldy\t.LP%d\n\tjsr mcount\n", (LABELNO))
 
 /* Output assembler code to FILE to initialize this source file's
    basic block profiling info, if that has not already been done.  */


More information about the Gcc-patches mailing list