Commit d5bf1143 by Richard Henderson Committed by Richard Henderson

function.c (expand_function_start): Always use a pseudo for the function result value.

        * function.c (expand_function_start): Always use a pseudo
        for the function result value.

From-SVN: r42486
parent 9336389d
2001-05-23 Richard Henderson <rth@redhat.com>
* function.c (expand_function_start): Always use a pseudo
for the function result value.
2001-05-22 Richard Henderson <rth@redhat.com> 2001-05-22 Richard Henderson <rth@redhat.com>
* config/mips/iris6.h (EH_FRAME_SECTION_ASM_OP): Give the * config/mips/iris6.h (EH_FRAME_SECTION_ASM_OP): Give the
......
...@@ -6366,13 +6366,10 @@ expand_function_start (subr, parms_have_cleanups) ...@@ -6366,13 +6366,10 @@ expand_function_start (subr, parms_have_cleanups)
else if (DECL_MODE (DECL_RESULT (subr)) == VOIDmode) else if (DECL_MODE (DECL_RESULT (subr)) == VOIDmode)
/* If return mode is void, this decl rtl should not be used. */ /* If return mode is void, this decl rtl should not be used. */
SET_DECL_RTL (DECL_RESULT (subr), NULL_RTX); SET_DECL_RTL (DECL_RESULT (subr), NULL_RTX);
else if (parms_have_cleanups else
|| current_function_instrument_entry_exit
|| (flag_exceptions && USING_SJLJ_EXCEPTIONS))
{ {
/* If function will end with cleanup code for parms, compute the /* Compute the return values into a pseudo reg, which we will copy
return values into a pseudo reg, which we will copy into the into the true return register after the cleanups are done. */
true return register after the cleanups are done. */
/* In order to figure out what mode to use for the pseudo, we /* In order to figure out what mode to use for the pseudo, we
figure out what the mode of the eventual return register will figure out what the mode of the eventual return register will
...@@ -6393,22 +6390,6 @@ expand_function_start (subr, parms_have_cleanups) ...@@ -6393,22 +6390,6 @@ expand_function_start (subr, parms_have_cleanups)
in case it's a named return value whose address is taken. */ in case it's a named return value whose address is taken. */
DECL_REGISTER (DECL_RESULT (subr)) = 1; DECL_REGISTER (DECL_RESULT (subr)) = 1;
} }
else
{
/* Scalar, returned in a register. */
SET_DECL_RTL (DECL_RESULT (subr),
hard_function_value (TREE_TYPE (DECL_RESULT (subr)),
subr, 1));
/* Mark this reg as the function's return value. */
if (GET_CODE (DECL_RTL (DECL_RESULT (subr))) == REG)
{
REG_FUNCTION_VALUE_P (DECL_RTL (DECL_RESULT (subr))) = 1;
/* Needed because we may need to move this to memory
in case it's a named return value whose address is taken. */
DECL_REGISTER (DECL_RESULT (subr)) = 1;
}
}
/* Initialize rtx for parameters and local variables. /* Initialize rtx for parameters and local variables.
In some cases this requires emitting insns. */ In some cases this requires emitting insns. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment