diff options
author | Richard Henderson <rth@redhat.com> | 2005-09-17 11:38:36 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2005-09-17 11:38:36 -0700 |
commit | 652b0932d7753aec43306dee62e5005492a6cf3c (patch) | |
tree | 586ee19cf00f968f147f254400212285835033a4 /gcc/function.c | |
parent | 3fb90446b48b875877c4f09c0085fe59b836bbfe (diff) | |
download | gcc-652b0932d7753aec43306dee62e5005492a6cf3c.zip gcc-652b0932d7753aec43306dee62e5005492a6cf3c.tar.gz gcc-652b0932d7753aec43306dee62e5005492a6cf3c.tar.bz2 |
expr.c (emit_move_via_integer): Add force argument, pass it on to emit_move_change_mode.
* expr.c (emit_move_via_integer): Add force argument, pass it on
to emit_move_change_mode. Update callers.
(emit_move_complex): Pass true to new force argument.
* function.c (expand_function_end): Move expand_eh_return call
earlier. Merge sub-word complex values into a pseudo before
copying to the return hard register.
From-SVN: r104371
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/gcc/function.c b/gcc/function.c index 014b38c..2df1eff 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4403,6 +4403,10 @@ expand_function_end (void) if (flag_exceptions && USING_SJLJ_EXCEPTIONS) sjlj_emit_function_exit_after (get_last_insn ()); + /* If this is an implementation of throw, do what's necessary to + communicate between __builtin_eh_return and the epilogue. */ + expand_eh_return (); + /* If scalar return value was computed in a pseudo-reg, or was a named return value that got dumped to the stack, copy that to the hard return register. */ @@ -4464,6 +4468,24 @@ expand_function_end (void) TREE_TYPE (decl_result), int_size_in_bytes (TREE_TYPE (decl_result))); } + /* In the case of complex integer modes smaller than a word, we'll + need to generate some non-trivial bitfield insertions. Do that + on a pseudo and not the hard register. */ + else if (GET_CODE (decl_rtl) == CONCAT + && GET_MODE_CLASS (GET_MODE (decl_rtl)) == MODE_COMPLEX_INT + && GET_MODE_BITSIZE (GET_MODE (decl_rtl)) <= BITS_PER_WORD) + { + int old_generating_concat_p; + rtx tmp; + + old_generating_concat_p = generating_concat_p; + generating_concat_p = 0; + tmp = gen_reg_rtx (GET_MODE (decl_rtl)); + generating_concat_p = old_generating_concat_p; + + emit_move_insn (tmp, decl_rtl); + emit_move_insn (real_decl_rtl, tmp); + } else emit_move_insn (real_decl_rtl, decl_rtl); } @@ -4505,10 +4527,6 @@ expand_function_end (void) current_function_return_rtx = outgoing; } - /* If this is an implementation of throw, do what's necessary to - communicate between __builtin_eh_return and the epilogue. */ - expand_eh_return (); - /* Emit the actual code to clobber return register. */ { rtx seq; |