reload.c (find_equiv_reg): When checking for register overlap, don't index hard_regno_nregs with a pseudo-reg.

* reload.c (find_equiv_reg): When checking for register overlap,
	don't index hard_regno_nregs with a pseudo-reg.

From-SVN: r77278
This commit is contained in:
Geoffrey Keating 2004-02-04 23:58:11 +00:00 committed by Geoffrey Keating
parent a322288b35
commit 3c241c19b0
2 changed files with 9 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2004-02-04 Geoffrey Keating <geoffk@apple.com>
* reload.c (find_equiv_reg): When checking for register overlap,
don't index hard_regno_nregs with a pseudo-reg.
2004-02-04 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390.c (s390_trampoline_template): Remove gen_rtx().

View File

@ -6587,17 +6587,16 @@ find_equiv_reg (rtx goal, rtx insn, enum reg_class class, int other,
/* Reject registers that overlap GOAL. */
if (!goal_mem && !goal_const
&& regno + (int) hard_regno_nregs[regno][mode] > valueno
&& regno < valueno + (int) hard_regno_nregs[valueno][mode])
return 0;
if (regno >= 0 && regno < FIRST_PSEUDO_REGISTER)
nregs = hard_regno_nregs[regno][mode];
else
nregs = 1;
valuenregs = hard_regno_nregs[valueno][mode];
if (!goal_mem && !goal_const
&& regno + nregs > valueno && regno < valueno + valuenregs)
return 0;
/* 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.