doc/tm.h: prototype fixes

DJ Delorie
Fri Dec 19 19:37:00 GMT 2008

A couple of mis-matched prototypes I tripped over recently:

Index: tm.texi
--- tm.texi	(revision 142839)
+++ tm.texi	(working copy)
@@ -4007,13 +4007,13 @@ compiler when this occurs, and how many 
 @code{FUNCTION_ARG} for these arguments should return the first
 register to be used by the caller for this argument; likewise
 @code{FUNCTION_INCOMING_ARG}, for the called function.
 @end deftypefn
-@deftypefn {Target Hook} bool TARGET_PASS_BY_REFERENCE (CUMULATIVE_ARGS *@var{cum}, enum machine_mode @var{mode}, tree @var{type}, bool @var{named})
+@deftypefn {Target Hook} bool TARGET_PASS_BY_REFERENCE (CUMULATIVE_ARGS *@var{cum}, enum machine_mode @var{mode}, const_tree @var{type}, bool @var{named})
 This target hook should return @code{true} if an argument at the
 position indicated by @var{cum} should be passed by reference.  This
 predicate is queried after target independent reasons for being
 passed by reference, such as @code{TREE_ADDRESSABLE (type)}.
 If the hook returns true, a copy of that argument is made in memory and a
@@ -6068,13 +6068,13 @@ function address than to call an address
 Define this macro if a non-short-circuit operation produced by
 @samp{fold_range_test ()} is optimal.  This macro defaults to true if
 @code{BRANCH_COST} is greater than or equal to the value 2.
 @end defmac
-@deftypefn {Target Hook} bool TARGET_RTX_COSTS (rtx @var{x}, int @var{code}, int @var{outer_code}, int *@var{total})
+@deftypefn {Target Hook} bool TARGET_RTX_COSTS (rtx @var{x}, int @var{code}, int @var{outer_code}, int *@var{total}, bool @var{speed_p})
 This target hook describes the relative costs of RTL expressions.
 The cost may depend on the precise form of the expression, which is
 available for examination in @var{x}, and the rtx code of the expression
 in which it is contained, found in @var{outer_code}.  @var{code} is the
 expression code---redundant, since it can be obtained with
@@ -6095,13 +6095,13 @@ nonzero, this target hook should be used
 size cost of an expression, again relative to @code{COSTS_N_INSNS}.
 The hook returns true when all subexpressions of @var{x} have been
 processed, and false when @code{rtx_cost} should recurse.
 @end deftypefn
-@deftypefn {Target Hook} int TARGET_ADDRESS_COST (rtx @var{address})
+@deftypefn {Target Hook} int TARGET_ADDRESS_COST (rtx @var{address}, bool @var{speed_p})
 This hook computes the cost of an addressing mode that contains
 @var{address}.  If not defined, the cost is computed from
 the @var{address} expression and the @code{TARGET_RTX_COST} hook.
 For most CISC machines, the default cost is a good approximation of the
 true cost of the addressing mode.  However, on RISC machines, all
@@ -9229,13 +9229,13 @@ If defined, this target hook points to a
 attribute_spec} (defined in @file{tree.h}) specifying the machine
 specific attributes for this target and some of the restrictions on the
 entities to which these attributes are applied and the arguments they
 @end deftypevr
-@deftypefn {Target Hook} int TARGET_COMP_TYPE_ATTRIBUTES (tree @var{type1}, tree @var{type2})
+@deftypefn {Target Hook} int TARGET_COMP_TYPE_ATTRIBUTES (const_tree @var{type1}, const_tree @var{type2})
 If defined, this target hook is a function which returns zero if the attributes on
 @var{type1} and @var{type2} are incompatible, one if they are compatible,
 and two if they are nearly compatible (which causes a warning to be
 generated).  If this is not defined, machine-specific attributes are
 supposed always to be compatible.
 @end deftypefn
@@ -9301,13 +9301,13 @@ for this decl.  The list itself should n
 shared with other decls, but attributes may be chained on the head of
 the list and @code{*@var{attr_ptr}} modified to point to the new
 attributes, or a copy of the list may be made if further changes are
 @end deftypefn
-@deftypefn {Target Hook} bool TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P (tree @var{fndecl})
+@deftypefn {Target Hook} bool TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P (const_tree @var{fndecl})
 @cindex inlining
 This target hook returns @code{true} if it is ok to inline @var{fndecl}
 into the current function, despite its having target-specific
 attributes, @code{false} otherwise.  By default, if a function has a
 target specific attribute attached to it, it will not be inlined.
 @end deftypefn

More information about the Gcc-patches mailing list