diff options
author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-12 16:23:12 +0000 |
---|---|---|
committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-12 16:23:12 +0000 |
commit | c879dbcf300ded0ca2f86a8cd9ea87528c27f3c0 (patch) | |
tree | b0b3176056066392830be15ad78cfae11a09644e /gcc/function.c | |
parent | 321856ae54afc12d5aef1a56c195e51dfdd160e5 (diff) | |
download | gcc-c879dbcf300ded0ca2f86a8cd9ea87528c27f3c0.tar.gz |
2009-08-12 Paolo Bonzini <bonzini@gnu.org>
* doc/tm.texi (TARGET_PROMOTE_FUNCTION_MODE): Add documentation
for for_return == 2.
* function.c (assign_parm_setup_reg): Use for_return == 2, improve
comments.
* calls.c (expand_call): Fix typo.
* explow.c (promote_decl_mode): Use for_return == 2 for RESULT_DECL
and PARM_DECL.
* stmt.c (expand_value_return): Use promote_function_mode to copy out
of pseudo.
* targhooks.c (default_promote_function_mode): Handle for_return == 2.
* config/cris/cris.c (cris_promote_function_mode): Likewise.
* config/mmix/mmix.c (mmix_promote_function_mode): Likewise.
* config/pa/pa.c (pa_promote_function_mode): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150700 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/function.c b/gcc/function.c index 2294b971547..b1d467c5787 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -2770,13 +2770,11 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm, bool did_conversion = false; /* Store the parm in a pseudoregister during the function, but we may - need to do it in a wider mode. */ - - /* This is not really promoting for a call. However we need to be - consistent with assign_parm_find_data_types and expand_expr_real_1. */ + need to do it in a wider mode. Using 2 here makes the result + consistent with promote_decl_mode and thus expand_expr_real_1. */ promoted_nominal_mode = promote_function_mode (data->nominal_type, data->nominal_mode, &unsignedp, - TREE_TYPE (current_function_decl), 0); + TREE_TYPE (current_function_decl), 2); parmreg = gen_reg_rtx (promoted_nominal_mode); @@ -2796,7 +2794,8 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm, assign_parm_remove_parallels (data); - /* Copy the value into the register. */ + /* Copy the value into the register, thus bridging between + assign_parm_find_data_types and expand_expr_real_1. */ if (data->nominal_mode != data->passed_mode || promoted_nominal_mode != data->promoted_mode) { |