From 4a1d48f6e51ae470ce65372fdff3d674ea5e3ac2 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Wed, 7 Feb 2001 10:42:15 +0000 Subject: [PATCH] Document MD_INIT_BUILTINS, MD_EXPAND_BUILTIN From-SVN: r39516 --- gcc/ChangeLog | 2 ++ gcc/tm.texi | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index baa60ba6778..a5aaf89ac15 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 * config/sh/sh.md (reload_outsf): Removed. diff --git a/gcc/tm.texi b/gcc/tm.texi index 252c5c03099..b8af796d067 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 -- 2.30.2