diff options
author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-12 20:01:38 +0000 |
---|---|---|
committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-12 20:01:38 +0000 |
commit | a99c9f675cfaab0afeebdde116e86dea8fa8e35d (patch) | |
tree | 751aa24e56badee11aabd22e90f4af5e94f6c541 | |
parent | 9b42e41c9e25e5c757e524103171dd3923562188 (diff) | |
download | ppe42-gcc-a99c9f675cfaab0afeebdde116e86dea8fa8e35d.tar.gz ppe42-gcc-a99c9f675cfaab0afeebdde116e86dea8fa8e35d.zip |
* function.c (assign_parm_setup_block): Relax condition on
multi-register optimization.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93233 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/function.c | 61 |
2 files changed, 38 insertions, 28 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 63d96c1edc6..61d48463dad 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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> * config/sh/sh.md (udivsi3_sh2a, divsi3_sh2a): Give these patterns diff --git a/gcc/function.c b/gcc/function.c index 250d71bcb12..4f1fc1a5e7e 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -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, reconstitute it in register operations rather than on the stack. */ if (GET_CODE (entry_parm) == PARALLEL - && data->nominal_mode != BLKmode - && XVECLEN (entry_parm, 0) > 1 - && use_register_for_decl (parm)) + && data->nominal_mode != BLKmode) { - 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 - incompatible calls to emit_group_store. + push_to_sequence (all->conversion_insns); - For example, the following would be invalid, and would have to - be fixed by the conditional below: + /* For values returned in multiple registers, handle possible + incompatible calls to emit_group_store. - emit_group_store ((reg:SF), (parallel:DF)) - emit_group_store ((reg:SI), (parallel:DI)) + For example, the following would be invalid, and would have to + be fixed by the conditional below: - An example of this are doubles in e500 v2: - (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)); + emit_group_store ((reg:SF), (parallel:DF)) + emit_group_store ((reg:SI), (parallel:DI)) - all->conversion_insns = get_insns (); - end_sequence (); + An example of this are doubles in e500 v2: + (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); - return; + all->conversion_insns = get_insns (); + end_sequence (); + + SET_DECL_RTL (parm, parmreg); + return; + } } size = int_size_in_bytes (data->passed_type); |