David Edelsohn dje at
Tue Aug 16 14:03:16 EST 2005

>>>>> Kumar Gala writes:

>> Because -fomit-frame-pointer and -fno-omit-frame-pointer have no
>> effect on ppc or ppc64, I assume. :)

Kumar> I'm assuming that's a guess.  The reason I ask that is my memory  
Kumar> serves correctly r31 is used as the frame pointer if compiled that  
Kumar> way.  Maybe some GCC expert can chime in.  I'll copy David Edelsohn  
Kumar> and see if I get a response :)

	I am missing some context here.  On both 32-bit PowerPC Linux
(PowerPC SVR4) and 64-bit PowerPC Linux, GPR r31 is used as the frame
pointer.  PowerPC does not have a dedicated frame pointer and the PowerPC
ABI does not require an independent frame pointer in a function at all
times, so it can be omitted by default.  If the frame pointer is not
referenced for any unique needs, uses of the frame pointer are adjusted to
reference the stack pointer.  GCC only retains the PowerPC frame pointer
when dynamic stack allocation (alloca) is used within a function.
-fomit-frame-pointer has no effect on PowerPC because it is enabled by


More information about the Linuxppc-dev mailing list