calls.c (expand_call): Don't try to be clever about expanding the return slot address.

* calls.c (expand_call): Don't try to be clever about expanding
        the return slot address.

From-SVN: r60234
This commit is contained in:
Jason Merrill 2002-12-18 00:57:43 -05:00 committed by Jason Merrill
parent 212f6dd0fe
commit f32ac70dae
2 changed files with 15 additions and 12 deletions

View File

@ -1,3 +1,11 @@
2002-12-17 Jason Merrill <jason@redhat.com>
* calls.c (expand_call): Don't try to be clever about expanding
the return slot address.
* calls.c (expand_call): Handle CALL_EXPR_HAS_RETURN_SLOT_ADDR
with special struct-return ABIs.
2002-12-18 Kaz kojima <kkojima@gcc.gnu.org>
* config/sh/linux.h (NO_IMPLICIT_EXTERN_C, CPLUSPLUS_CPP_SPEC):

View File

@ -2249,18 +2249,13 @@ expand_call (exp, target, ignore)
if (CALL_EXPR_HAS_RETURN_SLOT_ADDR (exp))
{
/* The structure value address arg is already in actparms. */
if (struct_value_rtx == 0)
/* We want to pass it as a normal argument, so leave it. */
structure_value_addr_parm = 1;
else
{
/* We want to pass it in a special location. */
tree return_arg = TREE_VALUE (actparms);
actparms = TREE_CHAIN (actparms);
structure_value_addr = expand_expr (return_arg, struct_value_rtx,
VOIDmode, EXPAND_NORMAL);
}
/* The structure value address arg is already in actparms.
Pull it out. It might be nice to just leave it there, but
we need to set structure_value_addr. */
tree return_arg = TREE_VALUE (actparms);
actparms = TREE_CHAIN (actparms);
structure_value_addr = expand_expr (return_arg, NULL_RTX,
VOIDmode, EXPAND_NORMAL);
}
else if (target && GET_CODE (target) == MEM)
structure_value_addr = XEXP (target, 0);