diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2009-08-12 16:23:12 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2009-08-12 16:23:12 +0000 |
commit | 666e3cebe13c86ea21f84fb5b5d6d9e1dc49a9a5 (patch) | |
tree | b0b3176056066392830be15ad78cfae11a09644e /gcc/stmt.c | |
parent | 4b462d7786135d389f58ccda0a9dddf9ed4cee73 (diff) | |
download | gcc-666e3cebe13c86ea21f84fb5b5d6d9e1dc49a9a5.tar.gz |
tm.texi (TARGET_PROMOTE_FUNCTION_MODE): Add documentation for for_return == 2.
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.
From-SVN: r150700
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c index 29bcf870fba..fe60ba67150 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -1511,25 +1511,24 @@ expand_naked_return (void) static void expand_value_return (rtx val) { - /* Copy the value to the return location - unless it's already there. */ + /* Copy the value to the return location unless it's already there. */ tree decl = DECL_RESULT (current_function_decl); rtx return_reg = DECL_RTL (decl); if (return_reg != val) { - int unsignedp; + tree funtype = TREE_TYPE (current_function_decl); + tree type = TREE_TYPE (decl); + int unsignedp = TYPE_UNSIGNED (type); enum machine_mode old_mode = DECL_MODE (decl); - enum machine_mode mode = promote_decl_mode (decl, &unsignedp); + enum machine_mode mode = promote_function_mode (type, old_mode, + &unsignedp, funtype, 1); if (mode != old_mode) val = convert_modes (mode, old_mode, val, unsignedp); if (GET_CODE (return_reg) == PARALLEL) - { - tree type = TREE_TYPE (decl); - emit_group_load (return_reg, val, type, int_size_in_bytes (type)); - } + emit_group_load (return_reg, val, type, int_size_in_bytes (type)); else emit_move_insn (return_reg, val); } |