Commit 6f4a43e0 by Zack Weinberg

stmt.c (expand_return): If asked to return the RESULT_DECL, just call…

stmt.c (expand_return): If asked to return the RESULT_DECL, just call expand_value_return on result_rtl.

	* stmt.c (expand_return): If asked to return the RESULT_DECL,
	just call expand_value_return on result_rtl.

From-SVN: r85795
parent 1a186ec5
2004-08-10 Zack Weinberg <zack@codesourcery.com>
* stmt.c (expand_return): If asked to return the RESULT_DECL,
just call expand_value_return on result_rtl.
2004-08-10 Richard Henderson <rth@redhat.com> 2004-08-10 Richard Henderson <rth@redhat.com>
* builtins.def (BUILT_IN_STACK_ALLOC): Remove. * builtins.def (BUILT_IN_STACK_ALLOC): Remove.
......
...@@ -1635,8 +1635,6 @@ expand_return (tree retval) ...@@ -1635,8 +1635,6 @@ expand_return (tree retval)
expand_null_return (); expand_null_return ();
return; return;
} }
else if (TREE_CODE (retval) == RESULT_DECL)
retval_rhs = retval;
else if ((TREE_CODE (retval) == MODIFY_EXPR else if ((TREE_CODE (retval) == MODIFY_EXPR
|| TREE_CODE (retval) == INIT_EXPR) || TREE_CODE (retval) == INIT_EXPR)
&& TREE_CODE (TREE_OPERAND (retval, 0)) == RESULT_DECL) && TREE_CODE (TREE_OPERAND (retval, 0)) == RESULT_DECL)
...@@ -1646,6 +1644,11 @@ expand_return (tree retval) ...@@ -1646,6 +1644,11 @@ expand_return (tree retval)
result_rtl = DECL_RTL (DECL_RESULT (current_function_decl)); result_rtl = DECL_RTL (DECL_RESULT (current_function_decl));
/* If we are returning the RESULT_DECL, then the value has already
been stored into it, so we don't have to do anything special. */
if (TREE_CODE (retval_rhs) == RESULT_DECL)
expand_value_return (result_rtl);
/* If the result is an aggregate that is being returned in one (or more) /* If the result is an aggregate that is being returned in one (or more)
registers, load the registers here. The compiler currently can't handle registers, load the registers here. The compiler currently can't handle
copying a BLKmode value into registers. We could put this code in a copying a BLKmode value into registers. We could put this code in a
...@@ -1653,7 +1656,7 @@ expand_return (tree retval) ...@@ -1653,7 +1656,7 @@ expand_return (tree retval)
call/return), but until this feature is generally usable it is kept here call/return), but until this feature is generally usable it is kept here
(and in expand_call). */ (and in expand_call). */
if (retval_rhs != 0 else if (retval_rhs != 0
&& TYPE_MODE (TREE_TYPE (retval_rhs)) == BLKmode && TYPE_MODE (TREE_TYPE (retval_rhs)) == BLKmode
&& REG_P (result_rtl)) && REG_P (result_rtl))
{ {
......
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