aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1997-08-27 19:59:51 +0000
committerJeff Law <law@gcc.gnu.org>1997-08-27 13:59:51 -0600
commitf345de42fc8437a8742aa40cf865de357b21e37f (patch)
tree7d1359bf6a618db548e998e24f753e012f4a0dbd /gcc/function.c
parent67f68fd265af43b2ebeb3d478f71da0389763a98 (diff)
downloadgcc-f345de42fc8437a8742aa40cf865de357b21e37f.zip
gcc-f345de42fc8437a8742aa40cf865de357b21e37f.tar.gz
gcc-f345de42fc8437a8742aa40cf865de357b21e37f.tar.bz2
reorg.c (dbr_schedule): Allow current_function_return_rtx to be something other than a REG.
* reorg.c (dbr_schedule): Allow current_function_return_rtx to be something other than a REG. * function.c (expand_function_end): Fix current_function_return_rtx if it was a pseudo. Brought over from the fsf/devo. From-SVN: r14972
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/function.c b/gcc/function.c
index d12db1e..644cc72 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -191,10 +191,10 @@ CUMULATIVE_ARGS current_function_args_info;
char *current_function_name;
-/* If non-zero, an RTL expression for that location at which the current
- function returns its result. Always equal to
- DECL_RTL (DECL_RESULT (current_function_decl)), but provided
- independently of the tree structures. */
+/* If non-zero, an RTL expression for the location at which the current
+ function returns its result. If the current function returns its
+ result in a register, current_function_return_rtx will always be
+ the hard register containing the result. */
rtx current_function_return_rtx;
@@ -5692,6 +5692,11 @@ expand_function_end (filename, line, end_bindings)
emit_move_insn (real_decl_result,
DECL_RTL (DECL_RESULT (current_function_decl)));
emit_insn (gen_rtx (USE, VOIDmode, real_decl_result));
+
+ /* 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_result;
}
/* If returning a structure, arrange to return the address of the value