Verify class is ok when allocating reload reg in push_reload

From-SVN: r30702
This commit is contained in:
Bernd Schmidt 1999-11-29 12:09:54 +00:00 committed by Bernd Schmidt
parent ca1a4af124
commit 96b42f4c8c
2 changed files with 18 additions and 5 deletions

View File

@ -1,5 +1,9 @@
1999-11-29 Bernd Schmidt <bernds@cygnus.co.uk>
* reload.c (push_reload): When looking for a register to put into
reg_rtx, make sure all hard regs in a multi-reg register are in the
right class and nonfixed.
* haifa-sched.c (reg_last_uses, reg_last_sets, reg_last_clobbers,
pending_read_insns, pending_write_insns, pending_read_mems,
pending_write_mems, pending_list_length, last_pending_memory_flush,

View File

@ -1460,12 +1460,21 @@ push_reload (in, out, inloc, outloc, class,
&& GET_MODE_SIZE (inmode) <= GET_MODE_SIZE (GET_MODE (XEXP (note, 0)))
&& HARD_REGNO_MODE_OK (regno, inmode)
&& GET_MODE_SIZE (outmode) <= GET_MODE_SIZE (GET_MODE (XEXP (note, 0)))
&& HARD_REGNO_MODE_OK (regno, outmode)
&& TEST_HARD_REG_BIT (reg_class_contents[(int) class], regno)
&& !fixed_regs[regno])
&& HARD_REGNO_MODE_OK (regno, outmode))
{
rld[i].reg_rtx = gen_rtx_REG (inmode, regno);
break;
int offs;
int nregs = HARD_REGNO_NREGS (regno, inmode);
for (offs = 0; offs < nregs; offs++)
if (fixed_regs[regno + offs]
|| ! TEST_HARD_REG_BIT (reg_class_contents[(int) class],
regno + offs))
break;
if (offs == nregs)
{
rld[i].reg_rtx = gen_rtx_REG (inmode, regno);
break;
}
}
}