diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-08-11 12:48:40 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-08-11 12:48:40 -0400 |
commit | 5582b006ea943b962f600013e1cd264110239765 (patch) | |
tree | 913faa0dd03aa0564b6e3ad44d81a68e241226fb /gcc | |
parent | 89e7a14a5c5c6060f6b5c6b105d2a1ca16bd9f92 (diff) | |
download | gcc-5582b006ea943b962f600013e1cd264110239765.zip gcc-5582b006ea943b962f600013e1cd264110239765.tar.gz gcc-5582b006ea943b962f600013e1cd264110239765.tar.bz2 |
(expand_call): Ensure we call force_operand on structure_value_addr.
From-SVN: r7885
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/calls.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index f035079..38b1033 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -901,15 +901,18 @@ expand_call (exp, target, ignore) as if it were an extra parameter. */ if (structure_value_addr && struct_value_rtx == 0) { + /* If structure_value_addr is a REG other than + virtual_outgoing_args_rtx, we can use always use it. If it + is not a REG, we must always copy it into a register. + If it is virtual_outgoing_args_rtx, we must copy it to another + register in some cases. */ + rtx temp = (GET_CODE (structure_value_addr) != REG #ifdef ACCUMULATE_OUTGOING_ARGS - /* If the stack will be adjusted, make sure the structure address - does not refer to virtual_outgoing_args_rtx. */ - rtx temp = (stack_arg_under_construction - ? copy_addr_to_reg (structure_value_addr) - : force_reg (Pmode, structure_value_addr)); -#else - rtx temp = force_reg (Pmode, structure_value_addr); + || (stack_arg_under_construction + && structure_value_addr == virtual_outgoing_args_rtx) #endif + ? copy_addr_to_reg (structure_value_addr) + : structure_value_addr); actparms = tree_cons (error_mark_node, |