summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-20 22:42:01 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-20 22:42:01 +0000
commita2509aaa1da80c518f26b5fbdcfdb6e53a5d0def (patch)
tree06a9206319b71ba393811bbdb094a8c0bfcf8cd5 /gcc/function.c
parentba63c2231fa2e27ce9072d42ed7df7a26f831216 (diff)
downloadgcc-a2509aaa1da80c518f26b5fbdcfdb6e53a5d0def.tar.gz
2003-11-20 Fariborz Jahanian <fjahanian@apple.com>
David Edelsohn <edelsohn@gnu.org> * calls.c (expand_call): Allocate new temp in pass1. (store_one_arg): If PARALLEL, calculate excess using mode size of rtvec elt. * expr.c (emit_push_insn): If PARALLEL, calculate offset using mode size of rtvec elt. * function.c (assign_parms): Use parm in register, if available. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73775 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 04d34243dff..7bd31906a54 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4704,6 +4704,15 @@ assign_parms (tree fndecl)
Set DECL_RTL to that place. */
+ if (GET_CODE (entry_parm) == PARALLEL && nominal_mode != BLKmode)
+ {
+ /* Objects the size of a register can be combined in registers */
+ rtx parmreg = gen_reg_rtx (nominal_mode);
+ emit_group_store (parmreg, entry_parm, TREE_TYPE (parm),
+ int_size_in_bytes (TREE_TYPE (parm)));
+ SET_DECL_RTL (parm, parmreg);
+ }
+
if (nominal_mode == BLKmode
#ifdef BLOCK_REG_PADDING
|| (locate.where_pad == (BYTES_BIG_ENDIAN ? upward : downward)
@@ -4727,7 +4736,8 @@ assign_parms (tree fndecl)
assign_stack_local if space was not allocated in the argument
list. If it was, this will not work if PARM_BOUNDARY is not
a multiple of BITS_PER_WORD. It isn't clear how to fix this
- if it becomes a problem. */
+ if it becomes a problem. Exception is when BLKmode arrives
+ with arguments not conforming to word_mode. */
if (stack_parm == 0)
{
@@ -4735,7 +4745,9 @@ assign_parms (tree fndecl)
PUT_MODE (stack_parm, GET_MODE (entry_parm));
set_mem_attributes (stack_parm, parm, 1);
}
-
+ else if (GET_CODE (entry_parm) == PARALLEL
+ && GET_MODE(entry_parm) == BLKmode)
+ ;
else if (PARM_BOUNDARY % BITS_PER_WORD != 0)
abort ();
@@ -4798,7 +4810,10 @@ assign_parms (tree fndecl)
move_block_from_reg (REGNO (entry_parm), mem,
size_stored / UNITS_PER_WORD);
}
- SET_DECL_RTL (parm, stack_parm);
+ /* If parm is already bound to register pair, don't change
+ this binding. */
+ if (! DECL_RTL_SET_P (parm))
+ SET_DECL_RTL (parm, stack_parm);
}
else if (! ((! optimize
&& ! DECL_REGISTER (parm))