Commit 6b972c4f by Jim Wilson

(expand_call): Undo Feb 27 change.

(expand_call): Undo Feb 27 change.  Set nregs to -1 for
normal case.

From-SVN: r6805
parent 5a157bc4
...@@ -1782,19 +1782,21 @@ expand_call (exp, target, ignore) ...@@ -1782,19 +1782,21 @@ expand_call (exp, target, ignore)
else else
reg = list, list = 0; reg = list, list = 0;
/* Set to non-zero if must move a word at a time, even if just one /* Set to non-negative if must move a word at a time, even if just
word (e.g, partial == 1 && mode == DFmode). Set to zero if one word (e.g, partial == 1 && mode == DFmode). Set to -1 if
we just use a normal move insn. */ 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 nregs = (partial ? partial
: (TYPE_MODE (TREE_TYPE (args[i].tree_value)) == BLKmode : (TYPE_MODE (TREE_TYPE (args[i].tree_value)) == BLKmode
? -1 ? ((int_size_in_bytes (TREE_TYPE (args[i].tree_value))
: 0)); + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)
: -1));
/* If simple case, just do move. If normal partial, store_one_arg /* If simple case, just do move. If normal partial, store_one_arg
has already loaded the register for us. In all other cases, has already loaded the register for us. In all other cases,
load the register(s) from memory. */ load the register(s) from memory. */
if (nregs == 0) if (nregs == -1)
emit_move_insn (reg, args[i].value); emit_move_insn (reg, args[i].value);
#ifdef STRICT_ALIGNMENT #ifdef STRICT_ALIGNMENT
...@@ -1808,19 +1810,12 @@ expand_call (exp, target, ignore) ...@@ -1808,19 +1810,12 @@ expand_call (exp, target, ignore)
#endif #endif
else if (args[i].partial == 0 || args[i].pass_on_stack) else if (args[i].partial == 0 || args[i].pass_on_stack)
{ move_block_to_reg (REGNO (reg),
/* This value might be zero, if the argument is a zero size validize_mem (args[i].value), nregs,
structure with no fields, so we can't use it to set nregs args[i].mode);
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);
}
push_to_sequence (use_insns); push_to_sequence (use_insns);
if (nregs == 0) if (nregs == -1)
emit_insn (gen_rtx (USE, VOIDmode, reg)); emit_insn (gen_rtx (USE, VOIDmode, reg));
else else
use_regs (REGNO (reg), nregs); use_regs (REGNO (reg), nregs);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment