Document MD_INIT_BUILTINS, MD_EXPAND_BUILTIN
authorBernd Schmidt <bernds@redhat.com>
Wed, 7 Feb 2001 10:42:15 +0000 (10:42 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Wed, 7 Feb 2001 10:42:15 +0000 (10:42 +0000)
From-SVN: r39516

gcc/ChangeLog
gcc/tm.texi

index baa60ba67786424ee0df347fc8dfa6f535a68657..a5aaf89ac159305897f75ebc20cbe31a3ee65810 100644 (file)
@@ -3,6 +3,8 @@
        * builtins.c (expand_builtin_setjmp_receiver): Emit an ASM_INPUT as
        a scheduling barrier at the end.
 
+       * tm.texi (MD_INIT_BUILTINS, MD_EXPAND_BUILTIN): Document.
+
 2001-02-07  Alexandre Oliva  <aoliva@redhat.com>
 
        * config/sh/sh.md (reload_outsf): Removed.
index 252c5c0309915c2c56e010ef9ad585d48bbe2f0c..b8af796d067ccf1688f91fb52d811f2e28e9cde7 100644 (file)
@@ -8377,4 +8377,33 @@ converting code to conditional execution in the basic blocks
 A C expression to cancel any machine dependent modifications in
 converting code to conditional execution in the basic blocks
 @code{TEST_BB}, @code{THEN_BB}, @code{ELSE_BB}, and @code{JOIN_BB}.
+
+@findex MD_INIT_BUILTINS
+@item MD_INIT_BUILTINS
+Define this macro if you have any machine-specific builtin functions that
+need to be defined.  It should be a C expression that performs the
+necessary setup.
+
+Machine specific builtins can be useful to expand special machine
+instructions that would otherwise not normally be generated because
+they have no equivalent in the source language (for example, SIMD vector
+instructions or prefetch instructions).
+
+To create a builtin function, call the function @code{builtin_function}
+which is defined by the language frontend.  You can use any type nodes set
+up by @code{build_common_tree_nodes} and @code{build_common_tree_nodes_2};
+only language frontends that use these two functions will use
+@samp{MD_INIT_BUILTINS}.
+
+@findex MD_EXPAND_BUILTIN
+@item MD_EXPAND_BUILTIN(@var{exp}, @var{target}, @var{subtarget}, @var{mode}, @var{ignore})
+
+Expand a call to a machine specific builtin that was set up by
+@samp{MD_INIT_BUILTINS}.  @var{exp} is the expression for the function call;
+the result should go to @var{target} if that is convenient, and have mode
+@var{mode} if that is convenient.  @var{subtarget} may be used as the target
+for computing one of @var{exp}'s operands. @var{ignore} is nonzero if the value
+is to be ignored.
+This macro should return the result of the call to the builtin.
+
 @end table