diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-05-06 13:32:34 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-05-06 13:32:34 -0400 |
commit | 1fd3ef7f65b9a12b392c889568cbcde92abe5f5b (patch) | |
tree | f00680f8cf241c0d6b15d1d9c917d2184b5d0dac | |
parent | b8c21346e951e20db960b6ef4602f76677344c1b (diff) | |
download | gcc-1fd3ef7f65b9a12b392c889568cbcde92abe5f5b.zip gcc-1fd3ef7f65b9a12b392c889568cbcde92abe5f5b.tar.gz gcc-1fd3ef7f65b9a12b392c889568cbcde92abe5f5b.tar.bz2 |
(assign_parms): Use expr_size when appropriate.
From-SVN: r7228
-rw-r--r-- | gcc/function.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/gcc/function.c b/gcc/function.c index cc9fa50..5969162 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -3546,21 +3546,14 @@ assign_parms (fndecl, second_time) if (TYPE_SIZE (type) == 0 || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST) - { - /* This is a variable sized object. */ - /* ??? Can we use expr_size here? */ - rtx size_rtx = expand_expr (size_in_bytes (type), NULL_RTX, - TYPE_MODE (sizetype), 0); - - copy = gen_rtx (MEM, BLKmode, - allocate_dynamic_stack_space (size_rtx, NULL_RTX, - TYPE_ALIGN (type))); - } + /* This is a variable sized object. */ + copy = gen_rtx (MEM, BLKmode, + allocate_dynamic_stack_space + (expand_size (parm), NULL_RTX, + TYPE_ALIGN (type))); else - { - int size = int_size_in_bytes (type); - copy = assign_stack_temp (TYPE_MODE (type), size, 1); - } + copy = assign_stack_temp (TYPE_MODE (type), + int_size_in_bytes (type), 1); store_expr (parm, copy, 0); emit_move_insn (parmreg, XEXP (copy, 0)); |