... and while at it also update header comment for related helper
promote_function_mode()
gcc/ChangeLog:
* doc/tm.texi (TARGET_PROMOTE_FUNCTION_MODE): Document
semantics of for_return=0.
* explow.cc (promote_function_mode): Document the 3 possible
values of for_return.
Signed-off-by: Vineet Gupta <[email protected]>
---
gcc/doc/tm.texi | 1 +
gcc/explow.cc | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 394a46fdbaa5..7c867a6676c2 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -1089,6 +1089,7 @@ pointer} types.
@var{for_return} allows to distinguish the promotion of arguments and
return values. If it is @code{1}, a return value is being promoted and
@code{TARGET_FUNCTION_VALUE} must perform the same promotions done here.
+If it is @code{0}, an argument is being promoted.
If it is @code{2}, the returned mode should be that of the register in
which an incoming parameter is copied, or the outgoing result is computed;
then the hook should return the same mode as @code{promote_mode}, though
diff --git a/gcc/explow.cc b/gcc/explow.cc
index 2d228d199e9f..691c7d4c2d00 100644
--- a/gcc/explow.cc
+++ b/gcc/explow.cc
@@ -834,8 +834,8 @@ copy_to_suggested_reg (rtx x, rtx target, machine_mode mode)
PUNSIGNEDP points to the signedness of the type and may be adjusted
to show what signedness to use on extension operations.
- FOR_RETURN is nonzero if the caller is promoting the return value
- of FNDECL, else it is for promoting args. */
+ FOR_RETURN is 1 if the caller is promoting the return value of
+ FUNTYPE, 0 if promoting args, 2 if ??? */
machine_mode
promote_function_mode (const_tree type, machine_mode mode, int *punsignedp,
--
2.53.0