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
This commit is contained in:
parent
67f68fd265
commit
f345de42fc
@ -29,6 +29,11 @@ Wed Aug 27 01:24:25 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
|
||||
|
||||
Wed Aug 27 00:49:14 1997 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* 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.
|
||||
|
||||
* t-freebsd (USER_H): Include EXTRA_HEADERS and LANG_EXTRA_HEADERS.
|
||||
* x-netbsd: Likewise
|
||||
* x-dgux (USER_H): Include EXTRA_HEADERS and LANG_EXTRA_HEADERS
|
||||
|
@ -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
|
||||
|
@ -4492,8 +4492,7 @@ dbr_schedule (first, file)
|
||||
else
|
||||
SET_HARD_REG_BIT (end_of_function_needs.regs, STACK_POINTER_REGNUM);
|
||||
|
||||
if (current_function_return_rtx != 0
|
||||
&& GET_CODE (current_function_return_rtx) == REG)
|
||||
if (current_function_return_rtx != 0)
|
||||
mark_referenced_resources (current_function_return_rtx,
|
||||
&end_of_function_needs, 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user