Commit 0304dfbb by Doug Evans

expr.c (use_reg): Fix recording of USE information.

	* expr.c (use_reg): Fix recording of USE information.
	(use_regs): Likewise.
	Delete argument `reg'.  All callers changed.
	* expr.h (use_regs): Update prototype.
	* calls.c (expand_call): Update call to use_regs.  Call use_reg
	if parm is wholly in registers.

From-SVN: r7378
parent 869c489d
...@@ -1844,8 +1844,11 @@ expand_call (exp, target, ignore) ...@@ -1844,8 +1844,11 @@ expand_call (exp, target, ignore)
move_block_to_reg (REGNO (reg), move_block_to_reg (REGNO (reg),
validize_mem (args[i].value), nregs, validize_mem (args[i].value), nregs,
args[i].mode); args[i].mode);
use_regs (&call_fusage, reg, REGNO (reg), nregs); if (nregs == -1)
use_reg (&call_fusage, reg);
else
use_regs (&call_fusage, REGNO (reg), nregs == 0 ? 1 : nregs);
/* PARTIAL referred only to the first register, so clear it for the /* PARTIAL referred only to the first register, so clear it for the
next time. */ next time. */
......
...@@ -1671,34 +1671,31 @@ void ...@@ -1671,34 +1671,31 @@ void
use_reg (call_fusage, reg) use_reg (call_fusage, reg)
rtx *call_fusage, reg; rtx *call_fusage, reg;
{ {
if (GET_CODE (reg) == REG if (GET_CODE (reg) != REG
&& REGNO (reg) >= FIRST_PSEUDO_REGISTER) || REGNO (reg) >= FIRST_PSEUDO_REGISTER)
abort(); abort();
*call_fusage *call_fusage
= gen_rtx (EXPR_LIST, VOIDmode, = gen_rtx (EXPR_LIST, VOIDmode,
gen_rtx (USE, reg_raw_mode[REGNO (reg)], reg), *call_fusage); gen_rtx (USE, VOIDmode, reg), *call_fusage);
} }
/* Mark NREGS consecutive regs, starting at REGNO, as holding parameters /* Mark NREGS consecutive regs, starting at REGNO, as holding parameters
for the CALL_INSN. */ for the CALL_INSN. */
void void
use_regs (call_fusage, reg, regno, nregs) use_regs (call_fusage, regno, nregs)
rtx *call_fusage, reg; rtx *call_fusage;
int regno; int regno;
int nregs; int nregs;
{ {
if (nregs <= 1 && reg) int i;
use_reg (call_fusage, reg);
else
{
int i;
for (i = 0; i < nregs; i++) if (regno + nregs > FIRST_PSEUDO_REGISTER)
use_reg (call_fusage, gen_rtx (REG, word_mode, regno + i)); abort ();
}
for (i = 0; i < nregs; i++)
use_reg (call_fusage, gen_rtx (REG, reg_raw_mode[regno + i], regno + i));
} }
/* Write zeros through the storage of OBJECT. /* Write zeros through the storage of OBJECT.
......
...@@ -600,7 +600,7 @@ extern void move_block_from_reg PROTO((int, rtx, int, int)); ...@@ -600,7 +600,7 @@ extern void move_block_from_reg PROTO((int, rtx, int, int));
extern void use_reg PROTO((rtx*, rtx)); extern void use_reg PROTO((rtx*, rtx));
/* Mark NREGS consecutive regs, starting at REGNO, as holding parameters /* Mark NREGS consecutive regs, starting at REGNO, as holding parameters
for the next CALL_INSN. */ for the next CALL_INSN. */
extern void use_regs PROTO((rtx*, rtx, int, int)); extern void use_regs PROTO((rtx*, int, int));
/* Write zeros through the storage of OBJECT. /* Write zeros through the storage of OBJECT.
If OBJECT has BLKmode, SIZE is its length in bytes. */ If OBJECT has BLKmode, SIZE is its length in bytes. */
......
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