[PATCH] powerpc profile labelno broken by PR c++/6119 fix

David Edelsohn dje@watson.ibm.com
Sat Apr 20 22:20:00 GMT 2002


	When Jakub moved the increment of profile_label_no, it broke AIX
profiling.  Chadra Chavva had fixed a similar problem on AIX by generating
a label for an incremented label number in PROFILE_HOOK.  Jakub's change
in final.c caused AIX's label numbers to become out of sync.

	The final.c change was yet another change made without checking
the potential impact on other targets, which is especially dangerous
shortly before a release.

	The following patch removes the unnecessary increment from the AIX
code path.  Applied to mainline and 3.1 branch.

David


        * config/rs6000/rs6000.c (output_profile_hook): Do not increment
        labelno.

Index: rs6000.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.308
diff -c -p -r1.308 rs6000.c
*** rs6000.c	16 Apr 2002 21:56:09 -0000	1.308
--- rs6000.c	21 Apr 2002 05:01:46 -0000
*************** output_profile_hook (labelno)
*** 10455,10462 ****
        char buf[30];
        const char *label_name;
        rtx fun;
- 
-       labelno += 1;
  
        ASM_GENERATE_INTERNAL_LABEL (buf, "LP", labelno);
        STRIP_NAME_ENCODING (label_name, ggc_strdup (buf));
--- 10455,10460 ----



More information about the Gcc-patches mailing list