This is the mail archive of the
mailing list for the GCC project.
RE: FUNCTION_OK_FOR_SIBCALL vs INITIAL_FRAME_POINTER_OFFSET
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Richard Henderson'" <rth at redhat dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Mon, 20 Mar 2006 14:56:00 -0000
- Subject: RE: FUNCTION_OK_FOR_SIBCALL vs INITIAL_FRAME_POINTER_OFFSET
On 20 March 2006 14:45, Richard Henderson wrote:
Hi Richard :)
> On Sat, Mar 11, 2006 at 12:41:32AM -0000, Dave Korn wrote:
>> So, what if the decision it needs to make depends on the stack frame
>> size of the current function?
> How can this possibly be? When the sibcall is done, the current
> function's stack frame is removed.
If the stack frame size is >32kB, I need to use a temporary register in the
epilogue to assemble the lo/hi parts of the frame size before adding it to the
SP. In the non-sibcall version of the epilogue[*] it uses one of the
arg-passing volatiles as a scratch register, but of course in a sibcall
epilogue that register might have been pre-loaded with an argument for the
sibcall which we don't want to trash. So rather than get hairy with trying to
allocate scratch regs, I was just going to refuse sibcalls for functions with
huge stack frames. Hence my curiosity.
[*] - Which has until now been the only version for our custom target; it's
still using fprintfs in TARGET_ASM_FUNCTION_EPILOGUE, and I'm going one step
at a time to bring it up to scratch.
Can't think of a witty .sigline today....