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
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;
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
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);