Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Toon Moene <toon@moene.indiv.nluug.nl>
Subject: Re: Profiling still broken?
Date: Tue, 30 Sep 97 19:35:52 +0200	[thread overview]
Message-ID: <9709301735.AA18079@moene.indiv.nluug.nl> (raw)

>  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

             reply	other threads:[~1997-09-30 17:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-30 17:35 Toon Moene [this message]
1997-09-30 18:12 ` Em86 problems Scott Manley
     [not found] <34335786.41C67EA6@iis.fhg.de>
1997-10-02 16:05 ` Profiling still broken? Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
1997-10-02  8:12 Stefan Schroepfer
     [not found] <199710011105.NAA09773@blinky.bfr.co.il>
1997-10-02  6:09 ` Richard Henderson
     [not found] <9709291751.AA16877@moene.indiv.nluug.nl>
1997-09-30 13:50 ` Harvey J. Stein
1997-10-01 11:05 ` Harvey J. Stein
1997-09-29 17:51 Toon Moene
1997-09-29 13:37 Harvey J. Stein
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox