Commit 1d2215fe by Alexandre Oliva Committed by Alexandre Oliva

resource.c (mark_referenced_resources): Abort() before attempting to mark a pseudo register.

* resource.c (mark_referenced_resources): Abort() before
attempting to mark a pseudo register.
(mark_set_resources): Likewise.

From-SVN: r38581
parent 8b634749
2000-12-31 Alexandre Oliva <aoliva@redhat.com>
* resource.c (mark_referenced_resources): Abort() before
attempting to mark a pseudo register.
(mark_set_resources): Likewise.
2001-01-01 Michael Hayes <mhayes@redhat.com> 2001-01-01 Michael Hayes <mhayes@redhat.com>
* loop.h (REG_IV_CLASS): New accessor macro. * loop.h (REG_IV_CLASS): New accessor macro.
......
...@@ -212,14 +212,24 @@ mark_referenced_resources (x, res, include_delayed_effects) ...@@ -212,14 +212,24 @@ mark_referenced_resources (x, res, include_delayed_effects)
unsigned int last_regno unsigned int last_regno
= regno + HARD_REGNO_NREGS (regno, GET_MODE (x)); = regno + HARD_REGNO_NREGS (regno, GET_MODE (x));
if (last_regno > FIRST_PSEUDO_REGISTER)
abort ();
for (r = regno; r < last_regno; r++) for (r = regno; r < last_regno; r++)
SET_HARD_REG_BIT (res->regs, r); SET_HARD_REG_BIT (res->regs, r);
} }
return; return;
case REG: case REG:
for (r = 0; r < HARD_REGNO_NREGS (REGNO (x), GET_MODE (x)); r++) {
SET_HARD_REG_BIT (res->regs, REGNO (x) + r); unsigned int regno = REGNO (x);
unsigned int last_regno
= regno + HARD_REGNO_NREGS (regno, GET_MODE (x));
if (last_regno > FIRST_PSEUDO_REGISTER)
abort ();
for (r = regno; r < last_regno; r++)
SET_HARD_REG_BIT (res->regs, r);
}
return; return;
case MEM: case MEM:
...@@ -760,6 +770,8 @@ mark_set_resources (x, res, in_dest, mark_type) ...@@ -760,6 +770,8 @@ mark_set_resources (x, res, in_dest, mark_type)
unsigned int last_regno unsigned int last_regno
= regno + HARD_REGNO_NREGS (regno, GET_MODE (x)); = regno + HARD_REGNO_NREGS (regno, GET_MODE (x));
if (last_regno > FIRST_PSEUDO_REGISTER)
abort ();
for (r = regno; r < last_regno; r++) for (r = regno; r < last_regno; r++)
SET_HARD_REG_BIT (res->regs, r); SET_HARD_REG_BIT (res->regs, r);
} }
...@@ -768,8 +780,16 @@ mark_set_resources (x, res, in_dest, mark_type) ...@@ -768,8 +780,16 @@ mark_set_resources (x, res, in_dest, mark_type)
case REG: case REG:
if (in_dest) if (in_dest)
for (r = 0; r < HARD_REGNO_NREGS (REGNO (x), GET_MODE (x)); r++) {
SET_HARD_REG_BIT (res->regs, REGNO (x) + r); unsigned int regno = REGNO (x);
unsigned int last_regno
= regno + HARD_REGNO_NREGS (regno, GET_MODE (x));
if (last_regno > FIRST_PSEUDO_REGISTER)
abort ();
for (r = regno; r < last_regno; r++)
SET_HARD_REG_BIT (res->regs, r);
}
return; return;
case STRICT_LOW_PART: case STRICT_LOW_PART:
......
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