regrename.c (scan_rtx_reg): Terminate the chain rather than abort on mark_read with NO_REGS.

* regrename.c (scan_rtx_reg): Terminate the chain rather than
        abort on mark_read with NO_REGS.

From-SVN: r37644
This commit is contained in:
Richard Henderson 2000-11-21 19:19:34 -08:00 committed by Richard Henderson
parent 4dc1635549
commit a125d8555a
2 changed files with 30 additions and 15 deletions

View File

@ -1,3 +1,8 @@
2000-11-21 Richard Henderson <rth@redhat.com>
* regrename.c (scan_rtx_reg): Terminate the chain rather than
abort on mark_read with NO_REGS.
2000-11-21 Mike Stump <mrs@wrs.com> 2000-11-21 Mike Stump <mrs@wrs.com>
* fixinc/fixtests.c (TEST_FOR_FIX_PROC_HEAD): Fix to allow * fixinc/fixtests.c (TEST_FOR_FIX_PROC_HEAD): Fix to allow

View File

@ -325,26 +325,36 @@ scan_rtx_reg (insn, loc, class, action, type)
if (regno + nregs <= this_regno if (regno + nregs <= this_regno
|| this_regno + this_nregs <= regno) || this_regno + this_nregs <= regno)
p = &this->next_chain; {
else if (action == mark_read) p = &this->next_chain;
continue;
}
if (action == mark_read)
{ {
if (! exact_match) if (! exact_match)
abort (); abort ();
if (class == NO_REGS)
abort ();
this = (struct du_chain *) /* ??? Class NO_REGS can happen if the md file makes use of
obstack_alloc (&rename_obstack, sizeof (struct du_chain)); EXTRA_CONSTRAINTS to match registers. Which is arguably
this->next_use = *p; wrong, but there we are. Since we know not what this may
this->next_chain = (*p)->next_chain; be replaced with, terminate the chain. */
this->loc = loc; if (class != NO_REGS)
this->insn = insn; {
this->class = class; this = (struct du_chain *)
this->need_caller_save_reg = 0; obstack_alloc (&rename_obstack, sizeof (struct du_chain));
*p = this; this->next_use = *p;
return; this->next_chain = (*p)->next_chain;
this->loc = loc;
this->insn = insn;
this->class = class;
this->need_caller_save_reg = 0;
*p = this;
return;
}
} }
else if (action != terminate_overlapping_read || ! exact_match)
if (action != terminate_overlapping_read || ! exact_match)
{ {
struct du_chain *next = this->next_chain; struct du_chain *next = this->next_chain;