This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: arm gen_sibcall using gen_call [Re: GCC build failed with your patch.]
- To: Richard Earnshaw <rearnsha at arm dot com>
- Subject: Re: arm gen_sibcall using gen_call [Re: GCC build failed with your patch.]
- From: Richard Henderson <rth at cygnus dot com>
- Date: Mon, 29 May 2000 23:12:54 -0700
- Cc: Rod Stewart <stewart at lab43 dot org>, gcc-patches at gcc dot gnu dot org, scottb at netwinder dot org
- References: <20000529111739.A2849@cygnus.com> <200005292245.XAA12701@cam-mail2.cambridge.arm.com>
On Mon, May 29, 2000 at 11:45:25PM +0100, Richard Earnshaw wrote:
> What is FUNCTION_OK_FOR_SIBCALL? There is nothing in tm.texi about it...
Index: tm.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/tm.texi,v
retrieving revision 1.126
diff -c -p -d -r1.126 tm.texi
*** tm.texi 2000/05/28 23:40:19 1.126
--- tm.texi 2000/05/30 06:12:22
*************** This describes the stack layout and call
*** 2171,2176 ****
--- 2171,2177 ----
* Function Entry::
* Profiling::
* Inlining::
+ * Tail Calling::
@end menu
@node Frame Layout
*************** defines the @samp{FUNCTION_ATTRIBUTE_INL
*** 3683,3688 ****
--- 3684,3707 ----
takes one argument, a @samp{DECL} describing the function. It should
return non-zero if the function can be inlined, otherwise it should
return 0.
+
+ @node Tail Calling
+ @subsection Permitting tail calls to functions
+ @cindex tail calls
+ @cindex sibling calls
+
+ @table @code
+ @findex FUNCTION_OK_FOR_SIBCALL
+ @item FUNCTION_OK_FOR_SIBCALL (@var{decl})
+ A C expression that evaluates to true if it is ok to perform a sibling
+ call to @var{decl}.
+
+ It is not uncommon for limitations of calling conventions to prevent
+ tail calls to functions outside the current unit of translation, or
+ during PIC compilation. Use this macro to enforce these restrictions,
+ as the @code{sibcall} md pattern can not fail, or fall over to a
+ ``normal'' call.
+ @end table
@node Varargs
@section Implementing the Varargs Macros