This is the mail archive of the
mailing list for the GCC project.
Re: FUNCTION_OK_FOR_SIBCALL vs INITIAL_FRAME_POINTER_OFFSET
On Tuesday 21 March 2006 14:57, Richard Henderson wrote:
> On Mon, Mar 20, 2006 at 04:03:08PM -0000, Dave Korn wrote:
> > Do you happen to know off the top of your head when get_frame_size()
> > becomes valid?
> You don't get a good first-pass estimate until after all rtl
> generation has been done. Which is later than you need.
> Another possibility is to allocate an extra word high in the
> stack frame for temporary storage in large frames w/ sibcalls
> to functions using all arguments. Then you'd deallocate in
> several steps:
> scratchslot = argument
> argument = stack frame size - small
> sp += argument
> argument = scratchslot
> sp += small
This assumes you have a frame pointer or sp+large_offset addressing mode for
accessing scratchslot. In which case you could either use fp as scratch
storage or probably have an add sp, large_offset instruction.