summaryrefslogtreecommitdiffstats
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1994-03-17 23:36:20 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1994-03-17 23:36:20 +0000
commitd95fedab24f490228d7090d9f2c42d91454bb063 (patch)
tree42d022d8fb0ca4dbc448ad3d209b00c620a389a3 /gcc/calls.c
parentd3dcf1dc0d9f57a839c4ab8bfbcb030512ea34f3 (diff)
downloadppe42-gcc-d95fedab24f490228d7090d9f2c42d91454bb063.tar.gz
ppe42-gcc-d95fedab24f490228d7090d9f2c42d91454bb063.zip
(expand_call): Undo Feb 27 change. Set nregs to -1 for
normal case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6805 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r--gcc/calls.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index d9cc9f600a3..c7a85bed1f8 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -1782,19 +1782,21 @@ expand_call (exp, target, ignore)
else
reg = list, list = 0;
- /* Set to non-zero if must move a word at a time, even if just one
- word (e.g, partial == 1 && mode == DFmode). Set to zero if
- we just use a normal move insn. */
+ /* Set to non-negative if must move a word at a time, even if just
+ one word (e.g, partial == 1 && mode == DFmode). Set to -1 if
+ we just use a normal move insn. This value can be zero if the
+ argument is a zero size structure with no fields. */
nregs = (partial ? partial
: (TYPE_MODE (TREE_TYPE (args[i].tree_value)) == BLKmode
- ? -1
- : 0));
+ ? ((int_size_in_bytes (TREE_TYPE (args[i].tree_value))
+ + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)
+ : -1));
/* If simple case, just do move. If normal partial, store_one_arg
has already loaded the register for us. In all other cases,
load the register(s) from memory. */
- if (nregs == 0)
+ if (nregs == -1)
emit_move_insn (reg, args[i].value);
#ifdef STRICT_ALIGNMENT
@@ -1808,19 +1810,12 @@ expand_call (exp, target, ignore)
#endif
else if (args[i].partial == 0 || args[i].pass_on_stack)
- {
- /* This value might be zero, if the argument is a zero size
- structure with no fields, so we can't use it to set nregs
- above. */
- nregs = ((int_size_in_bytes (TREE_TYPE (args[i].tree_value))
- + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD);
- move_block_to_reg (REGNO (reg),
- validize_mem (args[i].value), nregs,
- args[i].mode);
- }
+ move_block_to_reg (REGNO (reg),
+ validize_mem (args[i].value), nregs,
+ args[i].mode);
push_to_sequence (use_insns);
- if (nregs == 0)
+ if (nregs == -1)
emit_insn (gen_rtx (USE, VOIDmode, reg));
else
use_regs (REGNO (reg), nregs);
OpenPOWER on IntegriCloud