This is the mail archive of the gcc-patches@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]

Re: arm gen_sibcall using gen_call [Re: GCC build failed with your patch.]


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

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