Commit 1b03c58a by Richard Guenther Committed by Kazu Hirata

re PR middle-end/28884 (TARGET_FUNCTION_VALUE not documented)

	PR middle-end/28884.
	* doc/tm.texi (TARGET_FUNCTION_VALUE): Document.
	(FUNCTION_VALUE, FUNCTION_OUTGOING_VALUE): Deprecate.
	Replace mentions of FUNCTION_VALUE and FUNCTION_OUTGOING_VALUE
	with TARGET_FUNCTION_VALUE.

Co-Authored-By: Kazu Hirata <kazu@codesourcery.com>

From-SVN: r116951
parent e8d0d6d2
2006-09-14 Richard Guenther <rguenther@suse.de>
Kazu Hirata <kazu@codesourcery.com>
PR middle-end/28884.
* doc/tm.texi (TARGET_FUNCTION_VALUE): Document.
(FUNCTION_VALUE, FUNCTION_OUTGOING_VALUE): Deprecate.
Replace mentions of FUNCTION_VALUE and FUNCTION_OUTGOING_VALUE
with TARGET_FUNCTION_VALUE.
2006-09-14 Anatoly Sokolov <aesok@post.ru> 2006-09-14 Anatoly Sokolov <aesok@post.ru>
PR target/26504 PR target/26504
......
...@@ -1015,8 +1015,8 @@ This target hook should return @code{true} if the promotion described by ...@@ -1015,8 +1015,8 @@ This target hook should return @code{true} if the promotion described by
@code{PROMOTE_FUNCTION_MODE} should be done for the return value of @code{PROMOTE_FUNCTION_MODE} should be done for the return value of
functions. functions.
If this target hook returns @code{true}, @code{FUNCTION_VALUE} must If this target hook returns @code{true}, @code{TARGET_FUNCTION_VALUE}
perform the same promotions done by @code{PROMOTE_FUNCTION_MODE}. must perform the same promotions done by @code{PROMOTE_FUNCTION_MODE}.
@end deftypefn @end deftypefn
@defmac PARM_BOUNDARY @defmac PARM_BOUNDARY
...@@ -4028,23 +4028,29 @@ must have move patterns for this mode. ...@@ -4028,23 +4028,29 @@ must have move patterns for this mode.
This section discusses the macros that control returning scalars as This section discusses the macros that control returning scalars as
values---values that can fit in registers. values---values that can fit in registers.
@defmac FUNCTION_VALUE (@var{valtype}, @var{func}) @deftypefn {Target Hook} rtx TARGET_FUNCTION_VALUE (tree @var{ret_type},
A C expression to create an RTX representing the place where a tree @var{fn_decl_or_type}, bool @var{outgoing})
function returns a value of data type @var{valtype}. @var{valtype} is
a tree node representing a data type. Write @code{TYPE_MODE Define this to return an RTX representing the place where a function
(@var{valtype})} to get the machine mode used to represent that type. returns or receives a value of data type @var{ret_type}, a tree node
On many machines, only the mode is relevant. (Actually, on most node representing a data type. @var{fn_decl_or_type} is a tree node
machines, scalar values are returned in the same place regardless of representing @code{FUNCTION_DECL} or @code{FUNCTION_TYPE} of a
mode). function being called. If @var{outgoing} is false, the hook should
compute the register in which the caller will see the return value.
The value of the expression is usually a @code{reg} RTX for the hard Otherwise, the hook should return an RTX representing the place where
register where the return value is stored. The value can also be a a function returns a value.
@code{parallel} RTX, if the return value is in multiple places. See
@code{FUNCTION_ARG} for an explanation of the @code{parallel} form. On many machines, only @code{TYPE_MODE (@var{ret_type})} is relevant.
(Actually, on most machines, scalar values are returned in the same
If @code{TARGET_PROMOTE_FUNCTION_RETURN} returns true, you must apply the same place regardless of mode.) The value of the expression is usually a
promotion rules specified in @code{PROMOTE_MODE} if @var{valtype} is a @code{reg} RTX for the hard register where the return value is stored.
scalar type. The value can also be a @code{parallel} RTX, if the return value is in
multiple places. See @code{FUNCTION_ARG} for an explanation of the
@code{parallel} form.
If @code{TARGET_PROMOTE_FUNCTION_RETURN} returns true, you must apply
the same promotion rules specified in @code{PROMOTE_MODE} if
@var{valtype} is a scalar type.
If the precise function being called is known, @var{func} is a tree If the precise function being called is known, @var{func} is a tree
node (@code{FUNCTION_DECL}) for it; otherwise, @var{func} is a null node (@code{FUNCTION_DECL}) for it; otherwise, @var{func} is a null
...@@ -4052,27 +4058,24 @@ pointer. This makes it possible to use a different value-returning ...@@ -4052,27 +4058,24 @@ pointer. This makes it possible to use a different value-returning
convention for specific functions when all their calls are convention for specific functions when all their calls are
known. known.
@code{FUNCTION_VALUE} is not used for return vales with aggregate data Some target machines have ``register windows'' so that the register in
types, because these are returned in another way. See which a function returns its value is not the same as the one in which
the caller sees the value. For such machines, you should return
different RTX depending on @var{outgoing}.
@code{TARGET_FUNCTION_VALUE} is not used for return values with
aggregate data types, because these are returned in another way. See
@code{TARGET_STRUCT_VALUE_RTX} and related macros, below. @code{TARGET_STRUCT_VALUE_RTX} and related macros, below.
@end deftypefn
@defmac FUNCTION_VALUE (@var{valtype}, @var{func})
This macro has been deprecated. Use @code{TARGET_FUNCTION_VALUE} for
a new target instead.
@end defmac @end defmac
@defmac FUNCTION_OUTGOING_VALUE (@var{valtype}, @var{func}) @defmac FUNCTION_OUTGOING_VALUE (@var{valtype}, @var{func})
Define this macro if the target machine has ``register windows'' This macro has been deprecated. Use @code{TARGET_FUNCTION_VALUE} for
so that the register in which a function returns its value is not a new target instead.
the same as the one in which the caller sees the value.
For such machines, @code{FUNCTION_VALUE} computes the register in which
the caller will see the value. @code{FUNCTION_OUTGOING_VALUE} should be
defined in a similar fashion to tell the function where to put the
value.
If @code{FUNCTION_OUTGOING_VALUE} is not defined,
@code{FUNCTION_VALUE} serves both purposes.
@code{FUNCTION_OUTGOING_VALUE} is not used for return vales with
aggregate data types, because these are returned in another way. See
@code{TARGET_STRUCT_VALUE_RTX} and related macros, below.
@end defmac @end defmac
@defmac LIBCALL_VALUE (@var{mode}) @defmac LIBCALL_VALUE (@var{mode})
...@@ -4123,10 +4126,11 @@ at the most significant end of a register (in other words, if they are ...@@ -4123,10 +4126,11 @@ at the most significant end of a register (in other words, if they are
padded at the least significant end). You can assume that @var{type} padded at the least significant end). You can assume that @var{type}
is returned in a register; the caller is required to check this. is returned in a register; the caller is required to check this.
Note that the register provided by @code{FUNCTION_VALUE} must be able Note that the register provided by @code{TARGET_FUNCTION_VALUE} must
to hold the complete return value. For example, if a 1-, 2- or 3-byte be able to hold the complete return value. For example, if a 1-, 2-
structure is returned at the most significant end of a 4-byte register, or 3-byte structure is returned at the most significant end of a
@code{FUNCTION_VALUE} should provide an @code{SImode} rtx. 4-byte register, @code{TARGET_FUNCTION_VALUE} should provide an
@code{SImode} rtx.
@end deftypefn @end deftypefn
@node Aggregate Return @node Aggregate Return
...@@ -4137,10 +4141,11 @@ structure is returned at the most significant end of a 4-byte register, ...@@ -4137,10 +4141,11 @@ structure is returned at the most significant end of a 4-byte register,
@cindex structure value address @cindex structure value address
When a function value's mode is @code{BLKmode} (and in some other When a function value's mode is @code{BLKmode} (and in some other
cases), the value is not returned according to @code{FUNCTION_VALUE} cases), the value is not returned according to
(@pxref{Scalar Return}). Instead, the caller passes the address of a @code{TARGET_FUNCTION_VALUE} (@pxref{Scalar Return}). Instead, the
block of memory in which the value should be stored. This address caller passes the address of a block of memory in which the value
is called the @dfn{structure value address}. should be stored. This address is called the @dfn{structure value
address}.
This section describes how to control returning structure values in This section describes how to control returning structure values in
memory. memory.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment