function arguments offset computation with -fomit-frame-pointer
Bernardo Innocenti
bernie@develer.com
Tue Jul 8 07:47:00 GMT 2003
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
More information about the Gcc
mailing list