From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <9709301735.AA18079@moene.indiv.nluug.nl> Date: Tue, 30 Sep 97 19:35:52 +0200 From: Toon Moene Subject: Re: Profiling still broken? > So in any case, what's one to do regarding profiling? > Is there a patch for gcc 2.7.2.1 to fix it? Or should > I grab some code from g77-0.5.21? Or should I get > 2.7.2.3? Or what? This is the patch that went into g77-0.5.21 for gcc-2.7.2.3: - - - - - - - - 8< - - - - - - - - - - - 8< - - - - - - - - - - - - diff -rcp2N gcc-2.7.2.3/final.c gcc-2.7.2.3.f.1/final.c *** gcc-2.7.2.3/final.c Sun Nov 26 18:50:00 1995 --- gcc-2.7.2.3.f.1/final.c Fri Jul 11 00:11:16 1997 *************** profile_function (file) *** 983,991 **** text_section (); ! #ifdef STRUCT_VALUE_INCOMING_REGNUM if (sval) ASM_OUTPUT_REG_PUSH (file, STRUCT_VALUE_INCOMING_REGNUM); #else ! #ifdef STRUCT_VALUE_REGNUM if (sval) ASM_OUTPUT_REG_PUSH (file, STRUCT_VALUE_REGNUM); --- 983,991 ---- text_section (); ! #if defined(STRUCT_VALUE_INCOMING_REGNUM) && defined(ASM_OUTPUT_REG_PUSH) if (sval) ASM_OUTPUT_REG_PUSH (file, STRUCT_VALUE_INCOMING_REGNUM); #else ! #if defined(STRUCT_VALUE_REGNUM) && defined(ASM_OUTPUT_REG_PUSH) if (sval) ASM_OUTPUT_REG_PUSH (file, STRUCT_VALUE_REGNUM); *************** profile_function (file) *** 993,1027 **** #endif ! #if 0 ! #ifdef STATIC_CHAIN_INCOMING_REGNUM if (cxt) ASM_OUTPUT_REG_PUSH (file, STATIC_CHAIN_INCOMING_REGNUM); #else ! #ifdef STATIC_CHAIN_REGNUM #else ! #ifdef STATIC_CHAIN_REGNUM if (cxt) ASM_OUTPUT_REG_PUSH (file, STATIC_CHAIN_REGNUM); #endif #endif - #endif /* 0 */ FUNCTION_PROFILER (file, profile_label_no); ! #if 0 ! #ifdef STATIC_CHAIN_INCOMING_REGNUM if (cxt) ASM_OUTPUT_REG_POP (file, STATIC_CHAIN_INCOMING_REGNUM); #else ! #ifdef STATIC_CHAIN_REGNUM if (cxt) ASM_OUTPUT_REG_POP (file, STATIC_CHAIN_REGNUM); #endif #endif - #endif /* 0 */ ! #ifdef STRUCT_VALUE_INCOMING_REGNUM if (sval) ASM_OUTPUT_REG_POP (file, STRUCT_VALUE_INCOMING_REGNUM); #else ! #ifdef STRUCT_VALUE_REGNUM if (sval) ASM_OUTPUT_REG_POP (file, STRUCT_VALUE_REGNUM); --- 993,1023 ---- #endif ! #if defined(STATIC_CHAIN_INCOMING_REGNUM) && defined(ASM_OUTPUT_REG_PUSH) if (cxt) ASM_OUTPUT_REG_PUSH (file, STATIC_CHAIN_INCOMING_REGNUM); #else ! #if defined(STATIC_CHAIN_REGNUM) && defined(ASM_OUTPUT_REG_PUSH) if (cxt) ASM_OUTPUT_REG_PUSH (file, STATIC_CHAIN_REGNUM); #endif #endif FUNCTION_PROFILER (file, profile_label_no); ! #if defined(STATIC_CHAIN_INCOMING_REGNUM) && defined(ASM_OUTPUT_REG_PUSH) if (cxt) ASM_OUTPUT_REG_POP (file, STATIC_CHAIN_INCOMING_REGNUM); #else ! #if defined(STATIC_CHAIN_REGNUM) && defined(ASM_OUTPUT_REG_PUSH) if (cxt) ASM_OUTPUT_REG_POP (file, STATIC_CHAIN_REGNUM); #endif #endif ! #if defined(STRUCT_VALUE_INCOMING_REGNUM) && defined(ASM_OUTPUT_REG_PUSH) if (sval) ASM_OUTPUT_REG_POP (file, STRUCT_VALUE_INCOMING_REGNUM); #else ! #if defined(STRUCT_VALUE_REGNUM) && defined(ASM_OUTPUT_REG_PUSH) if (sval) ! #if defined(STRUCT_VALUE_REGNUM) && defined(ASM_OUTPUT_REG_PUSH) if (sval) ASM_OUTPUT_REG_POP (file, STRUCT_VALUE_REGNUM); - - - - - - - - 8< - - - - - - - - - - - 8< - - - - - - - - - - - - This also seems to be what still is in egcs-970922, so it looks like this is safe. However, use at your own risk, void where prohibited, etc. HTH, Toon. -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com