Commit 96b42f4c by Bernd Schmidt Committed by Bernd Schmidt

Verify class is ok when allocating reload reg in push_reload

From-SVN: r30702
parent ca1a4af1
1999-11-29 Bernd Schmidt <bernds@cygnus.co.uk> 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, * haifa-sched.c (reg_last_uses, reg_last_sets, reg_last_clobbers,
pending_read_insns, pending_write_insns, pending_read_mems, pending_read_insns, pending_write_insns, pending_read_mems,
pending_write_mems, pending_list_length, last_pending_memory_flush, pending_write_mems, pending_list_length, last_pending_memory_flush,
......
...@@ -1460,14 +1460,23 @@ push_reload (in, out, inloc, outloc, class, ...@@ -1460,14 +1460,23 @@ push_reload (in, out, inloc, outloc, class,
&& GET_MODE_SIZE (inmode) <= GET_MODE_SIZE (GET_MODE (XEXP (note, 0))) && GET_MODE_SIZE (inmode) <= GET_MODE_SIZE (GET_MODE (XEXP (note, 0)))
&& HARD_REGNO_MODE_OK (regno, inmode) && HARD_REGNO_MODE_OK (regno, inmode)
&& GET_MODE_SIZE (outmode) <= GET_MODE_SIZE (GET_MODE (XEXP (note, 0))) && GET_MODE_SIZE (outmode) <= GET_MODE_SIZE (GET_MODE (XEXP (note, 0)))
&& HARD_REGNO_MODE_OK (regno, outmode) && HARD_REGNO_MODE_OK (regno, outmode))
&& TEST_HARD_REG_BIT (reg_class_contents[(int) class], regno) {
&& !fixed_regs[regno]) 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); rld[i].reg_rtx = gen_rtx_REG (inmode, regno);
break; break;
} }
} }
}
if (out) if (out)
output_reloadnum = i; output_reloadnum = i;
......
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