Commit 640019aa by Aldy Hernandez Committed by Aldy Hernandez

function.c (assign_parm_setup_block): Relax condition on multi-register optimization.

	* function.c (assign_parm_setup_block): Relax condition on
	multi-register optimization.

From-SVN: r93233
parent 88910b6a
2005-01-12 Aldy Hernandez <aldyh@redhat.com>
* function.c (assign_parm_setup_block): Relax condition on
multi-register optimization.
2005-01-12 Nick Clifton <nickc@redhat.com> 2005-01-12 Nick Clifton <nickc@redhat.com>
* config/sh/sh.md (udivsi3_sh2a, divsi3_sh2a): Give these patterns * config/sh/sh.md (udivsi3_sh2a, divsi3_sh2a): Give these patterns
......
...@@ -2560,42 +2560,47 @@ assign_parm_setup_block (struct assign_parm_data_all *all, ...@@ -2560,42 +2560,47 @@ assign_parm_setup_block (struct assign_parm_data_all *all,
/* If we've a non-block object that's nevertheless passed in parts, /* If we've a non-block object that's nevertheless passed in parts,
reconstitute it in register operations rather than on the stack. */ reconstitute it in register operations rather than on the stack. */
if (GET_CODE (entry_parm) == PARALLEL if (GET_CODE (entry_parm) == PARALLEL
&& data->nominal_mode != BLKmode && data->nominal_mode != BLKmode)
&& XVECLEN (entry_parm, 0) > 1
&& use_register_for_decl (parm))
{ {
rtx parmreg = gen_reg_rtx (data->nominal_mode); rtx elt0 = XEXP (XVECEXP (entry_parm, 0, 0), 0);
push_to_sequence (all->conversion_insns); if ((XVECLEN (entry_parm, 0) > 1
|| hard_regno_nregs[REGNO (elt0)][GET_MODE (elt0)] > 1)
&& use_register_for_decl (parm))
{
rtx parmreg = gen_reg_rtx (data->nominal_mode);
/* For values returned in multiple registers, handle possible push_to_sequence (all->conversion_insns);
incompatible calls to emit_group_store.
For example, the following would be invalid, and would have to /* For values returned in multiple registers, handle possible
be fixed by the conditional below: incompatible calls to emit_group_store.
emit_group_store ((reg:SF), (parallel:DF)) For example, the following would be invalid, and would have to
emit_group_store ((reg:SI), (parallel:DI)) be fixed by the conditional below:
An example of this are doubles in e500 v2: emit_group_store ((reg:SF), (parallel:DF))
(parallel:DF (expr_list (reg:SI) (const_int 0)) emit_group_store ((reg:SI), (parallel:DI))
(expr_list (reg:SI) (const_int 4))). */
if (data->nominal_mode != data->passed_mode)
{
rtx t = gen_reg_rtx (GET_MODE (entry_parm));
emit_group_store (t, entry_parm, NULL_TREE,
GET_MODE_SIZE (GET_MODE (entry_parm)));
convert_move (parmreg, t, 0);
}
else
emit_group_store (parmreg, entry_parm, data->nominal_type,
int_size_in_bytes (data->nominal_type));
all->conversion_insns = get_insns (); An example of this are doubles in e500 v2:
end_sequence (); (parallel:DF (expr_list (reg:SI) (const_int 0))
(expr_list (reg:SI) (const_int 4))). */
if (data->nominal_mode != data->passed_mode)
{
rtx t = gen_reg_rtx (GET_MODE (entry_parm));
emit_group_store (t, entry_parm, NULL_TREE,
GET_MODE_SIZE (GET_MODE (entry_parm)));
convert_move (parmreg, t, 0);
}
else
emit_group_store (parmreg, entry_parm, data->nominal_type,
int_size_in_bytes (data->nominal_type));
SET_DECL_RTL (parm, parmreg); all->conversion_insns = get_insns ();
return; end_sequence ();
SET_DECL_RTL (parm, parmreg);
return;
}
} }
size = int_size_in_bytes (data->passed_type); size = int_size_in_bytes (data->passed_type);
......
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