(assign_parms): Use expr_size when appropriate.
From-SVN: r7228
This commit is contained in:
parent
b8c21346e9
commit
1fd3ef7f65
@ -3546,21 +3546,14 @@ assign_parms (fndecl, second_time)
|
|||||||
|
|
||||||
if (TYPE_SIZE (type) == 0
|
if (TYPE_SIZE (type) == 0
|
||||||
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
|
|| TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
|
||||||
{
|
/* This is a variable sized object. */
|
||||||
/* This is a variable sized object. */
|
copy = gen_rtx (MEM, BLKmode,
|
||||||
/* ??? Can we use expr_size here? */
|
allocate_dynamic_stack_space
|
||||||
rtx size_rtx = expand_expr (size_in_bytes (type), NULL_RTX,
|
(expand_size (parm), NULL_RTX,
|
||||||
TYPE_MODE (sizetype), 0);
|
TYPE_ALIGN (type)));
|
||||||
|
|
||||||
copy = gen_rtx (MEM, BLKmode,
|
|
||||||
allocate_dynamic_stack_space (size_rtx, NULL_RTX,
|
|
||||||
TYPE_ALIGN (type)));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
copy = assign_stack_temp (TYPE_MODE (type),
|
||||||
int size = int_size_in_bytes (type);
|
int_size_in_bytes (type), 1);
|
||||||
copy = assign_stack_temp (TYPE_MODE (type), size, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
store_expr (parm, copy, 0);
|
store_expr (parm, copy, 0);
|
||||||
emit_move_insn (parmreg, XEXP (copy, 0));
|
emit_move_insn (parmreg, XEXP (copy, 0));
|
||||||
|
Loading…
Reference in New Issue
Block a user