This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs-19980508 powerpc-ibm-aix4.1.4.0 results (failures with -p/-pg)
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: egcs-19980508 powerpc-ibm-aix4.1.4.0 results (failures with -p/-pg)
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sun, 07 Jun 1998 13:55:20 -0600
- cc: dje at watson dot ibm dot com, egcs at cygnus dot com, meissner at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199806071933.PAA29795@caip.rutgers.edu>you write:
> Hpux9 w/gas also fails when using -p/-pg with nested functions.
> (Eg, 931002-1.c, 921017-1.c.) So perhaps you could investigate/fix on
> the PA. If the two problems stem from conceptually similar issues it
> might provide assistance to help on AIX.
I believe the fix is to save & restore the static link register
around the calls to mcount. Of course how you accomplish that
is significantly different for the two ports :-)
It should be relatively simple on the PA, you just have to
allocate a stack slot for the link register, then save and
restore it in the same code that saves/restores the argument
registers (since those have to be saved/restored around the
mcount call too).
The rs6000 is a little more complicated since it actually uses
the static link register in the setup code, though presumably
all you have to do is arrange to save it early enough in the
prologue and restore it in the proper place.
jeff