PowerPC no longer errors with -p/-pg & nested functions :-)

David Edelsohn dje@watson.ibm.com
Wed Mar 31 23:46:00 GMT 1999


	GCC uses the push/pop machine description macros to save and
restore the static chain maintaining the state for nested functions.  The
previous version of those macros overwrote the AIX link register save area
so that when a function restored the link register it pointed to invalid
memory and AIX killed the process.  The recent change moves the location
to another part of the fixed stack frame which does not cause AIX to crash
but still is invalid.

	I believe that the correct location really is the area referenced
by STACK_DYNAMIC_OFFSET macro: the alloca area.  The push/pop macros move
the stack but then do not skip the fixed stack frame area at the end of
the stack to use the real hole opened by the stack change.  I posted a
patch to egcs-patches and I am waiting for a response from Kenner or
another core maintainer to check if I am using that macro correctly.

David



More information about the Gcc mailing list