diff options
author | Richard Henderson <rth@redhat.com> | 2002-04-18 21:41:34 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-04-18 21:41:34 -0700 |
commit | 58533fa280d2d55e932c8ed979e5ee167cdc7891 (patch) | |
tree | 011f22bf1211c4716db4b4fdaacc7666e30d69f6 /gcc/function.c | |
parent | 0cd3301ba72bd155f8808d6395e5766a592e980c (diff) | |
download | gcc-58533fa280d2d55e932c8ed979e5ee167cdc7891.zip gcc-58533fa280d2d55e932c8ed979e5ee167cdc7891.tar.gz gcc-58533fa280d2d55e932c8ed979e5ee167cdc7891.tar.bz2 |
* function.c: Revert patch for c/6358.
From-SVN: r52511
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 47 |
1 files changed, 14 insertions, 33 deletions
diff --git a/gcc/function.c b/gcc/function.c index 4562376..86a87ab 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -5145,35 +5145,6 @@ assign_parms (fndecl) current_function_return_rtx = (DECL_RTL_SET_P (DECL_RESULT (fndecl)) ? DECL_RTL (DECL_RESULT (fndecl)) : NULL_RTX); - - /* 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. */ - if (DECL_RTL_SET_P (DECL_RESULT (fndecl))) - { - tree decl_result = DECL_RESULT (fndecl); - rtx decl_rtl = DECL_RTL (decl_result); - - if (REG_P (decl_rtl) - ? REGNO (decl_rtl) >= FIRST_PSEUDO_REGISTER - : DECL_REGISTER (decl_result)) - { - rtx real_decl_rtl; - -#ifdef FUNCTION_OUTGOING_VALUE - real_decl_rtl = FUNCTION_OUTGOING_VALUE (TREE_TYPE (decl_result), - fndecl); -#else - real_decl_rtl = FUNCTION_VALUE (TREE_TYPE (decl_result), - fndecl); -#endif - REG_FUNCTION_VALUE_P (real_decl_rtl) = 1; - /* The delay slot scheduler assumes that current_function_return_rtx - holds the hard register containing the return value, not a - temporary pseudo. */ - current_function_return_rtx = real_decl_rtl; - } - } } /* Indicate whether REGNO is an incoming argument to the current function @@ -6987,11 +6958,16 @@ expand_function_end (filename, line, end_bindings) ? REGNO (decl_rtl) >= FIRST_PSEUDO_REGISTER : DECL_REGISTER (decl_result)) { - rtx real_decl_rtl = current_function_return_rtx; + rtx real_decl_rtl; - /* This should be set in assign_parms. */ - if (! REG_FUNCTION_VALUE_P (real_decl_rtl)) - abort (); +#ifdef FUNCTION_OUTGOING_VALUE + real_decl_rtl = FUNCTION_OUTGOING_VALUE (TREE_TYPE (decl_result), + current_function_decl); +#else + real_decl_rtl = FUNCTION_VALUE (TREE_TYPE (decl_result), + current_function_decl); +#endif + REG_FUNCTION_VALUE_P (real_decl_rtl) = 1; /* If this is a BLKmode structure being returned in registers, then use the mode computed in expand_return. Note that if @@ -7019,6 +6995,11 @@ expand_function_end (filename, line, end_bindings) int_size_in_bytes (TREE_TYPE (decl_result))); else emit_move_insn (real_decl_rtl, decl_rtl); + + /* The delay slot scheduler assumes that current_function_return_rtx + holds the hard register containing the return value, not a + temporary pseudo. */ + current_function_return_rtx = real_decl_rtl; } } |