aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@redhat.com>2001-02-07 10:42:15 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2001-02-07 10:42:15 +0000
commit4a1d48f6e51ae470ce65372fdff3d674ea5e3ac2 (patch)
tree285b886f45e73c3d04653ff73b80ed4d5a89ae1f /gcc
parentbcd7edfe5ee015bf0975d934a7a9924041be7b0f (diff)
downloadgcc-4a1d48f6e51ae470ce65372fdff3d674ea5e3ac2.zip
gcc-4a1d48f6e51ae470ce65372fdff3d674ea5e3ac2.tar.gz
gcc-4a1d48f6e51ae470ce65372fdff3d674ea5e3ac2.tar.bz2
Document MD_INIT_BUILTINS, MD_EXPAND_BUILTIN
From-SVN: r39516
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog2
-rw-r--r--gcc/tm.texi29
2 files changed, 31 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index baa60ba..a5aaf89 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/tm.texi b/gcc/tm.texi
index 252c5c0..b8af796 100644
--- a/gcc/tm.texi
+++ b/gcc/tm.texi
@@ -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