reload.c (find_equiv_reg): Checks all valueno regs as a reload_reg_p regs.

* reload.c (find_equiv_reg): Checks all valueno regs
        as a reload_reg_p regs.

From-SVN: r33361
This commit is contained in:
Denis Chertykov 2000-04-23 22:25:25 +00:00 committed by Jeff Law
parent a6a69fc2ad
commit 16ab191f30
2 changed files with 15 additions and 6 deletions

View File

@ -1,3 +1,8 @@
Sun Apr 23 16:24:35 2000 Denis Chertykov <denisc@overta.ru>
* reload.c (find_equiv_reg): Checks all valueno regs
as a reload_reg_p regs.
2000-04-23 Zack Weinberg <zack@wolery.cumb.org>
* cpphash.c (collect_objlike_expansion): Add sanity check.

View File

@ -6112,18 +6112,22 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
&& regno < valueno + (int) HARD_REGNO_NREGS (valueno, mode))
return 0;
nregs = HARD_REGNO_NREGS (regno, mode);
valuenregs = HARD_REGNO_NREGS (valueno, mode);
/* Reject VALUE if it is one of the regs reserved for reloads.
Reload1 knows how to reuse them anyway, and it would get
confused if we allocated one without its knowledge.
(Now that insns introduced by reload are ignored above,
this case shouldn't happen, but I'm not positive.) */
if (reload_reg_p != 0 && reload_reg_p != (short *) (HOST_WIDE_INT) 1
&& reload_reg_p[valueno] >= 0)
return 0;
nregs = HARD_REGNO_NREGS (regno, mode);
valuenregs = HARD_REGNO_NREGS (valueno, mode);
if (reload_reg_p != 0 && reload_reg_p != (short *) (HOST_WIDE_INT) 1)
{
int i;
for (i = 0; i < valuenregs; ++i)
if (reload_reg_p[valueno + i] >= 0)
return 0;
}
/* Reject VALUE if it is a register being used for an input reload
even if it is not one of those reserved. */