This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: function arguments offset computation with -fomit-frame-pointer


On Tuesday 08 July 2003 04:36, Jim Wilson wrote:

 > Only reload needs to know about frame offsets.
 > [...] 

 Thank you very much for the detailed explanation. Now it's much
more clear to me.

 > > I also have a more m68k-specific question: the code path for
 > > creating room for the frame when no frame pointer always adds 4
 > > bytes to the required frame size. Is that done to get the same
 > > offset that link/unlink would have done? Why is that necessary?
 >
 > Probably nobody knows anymore, it has been there for well over a
 > decard, but link/unlink space for the return address is the obvious
 > guess. Maybe the problem is that INITIAL_FRAME_POINTER_OFFSET isn't
 > checking frame_pointer_needed, and thus we always need to add the 4
 > bytes to make INITIAL_FRAME_POINTER_OFFSET work?  If so, then fixing
 > that macro would let you get rid of the extra 4 bytes in the prologue
 > code.

 I think I need why it's needed on Linux: there's code in the kernel that
needs to examine the stack frame and it assumes the 4 bytes for saving
the old frame pointer are always there. The kernel chokes if I remove them.

-- 
  // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/

Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]