/* Graph coloring register allocator
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Michael Matz <matz@suse.de>
and Daniel Berlin <dan@cgsoftware.com>
}
/* Otherwise we handle certain cases directly. */
- switch (*undefined)
- {
+ if (*undefined <= 0xffff)
+ switch ((int) *undefined)
+ {
case 0x00f0 : *undefined = 0; return BL_TO_WORD (4, 4);
case 0x00ff : *undefined = 0; return BL_TO_WORD (0, 8);
case 0x0f00 : *undefined = 0; return BL_TO_WORD (8, 4);
case 0xff00 : *undefined = 0; return BL_TO_WORD (8, 8);
case 0xfff0 : *undefined = 0xf0; return BL_TO_WORD (8, 8);
case 0xffff : *undefined = 0; return BL_TO_WORD (0, 16);
+ }
- /* And if nothing matched fall back to the general solution.
- For now unknown undefined bytes are converted to sequences
- of maximal length 4 bytes. We could make this larger if
- necessary. */
- default :
- {
- unsigned HOST_WIDE_INT u = *undefined;
- int word;
- struct undef_table_s tab;
- for (word = 0; (u & 15) == 0; word += 4)
- u >>= 4;
- u = u & 15;
- tab = undef_table[u];
- u = tab.new_undef;
- u = (*undefined & ~((unsigned HOST_WIDE_INT)15 << word))
- | (u << word);
- *undefined = u;
- /* Size remains the same, only the begin is moved up move bytes. */
- return tab.size_word + BL_TO_WORD (word, 0);
- }
- break;
- }
+ /* And if nothing matched fall back to the general solution. For
+ now unknown undefined bytes are converted to sequences of maximal
+ length 4 bytes. We could make this larger if necessary. */
+ {
+ unsigned HOST_WIDE_INT u = *undefined;
+ int word;
+ struct undef_table_s tab;
+ for (word = 0; (u & 15) == 0; word += 4)
+ u >>= 4;
+ u = u & 15;
+ tab = undef_table[u];
+ u = tab.new_undef;
+ u = (*undefined & ~((unsigned HOST_WIDE_INT)15 << word)) | (u << word);
+ *undefined = u;
+ /* Size remains the same, only the begin is moved up move bytes. */
+ return tab.size_word + BL_TO_WORD (word, 0);
+ }
}
/* Put the above three functions together. For a set of undefined bytes
struct web *web1 = wl->web;
struct web *web2 = ID2WEB (web1->id);
if (web1->regno != web2->regno
- || web1->crosses_call != web2->crosses_call
- || web1->live_over_abnormal != web2->live_over_abnormal
|| web1->mode_changed != web2->mode_changed
|| !rtx_equal_p (web1->orig_x, web2->orig_x)
|| web1->type != web2->type
/* Only compare num_defs/num_uses with non-hardreg webs.
E.g. the number of uses of the framepointer changes due to
inserting spill code. */
- || (web1->type != PRECOLORED &&
- (web1->num_uses != web2->num_uses
- || web1->num_defs != web2->num_defs)))
+ || (web1->type != PRECOLORED
+ && (web1->num_uses != web2->num_uses
+ || web1->num_defs != web2->num_defs))
+ /* Similarly, if the framepointer was unreferenced originally
+ but we added spills, these fields may not match. */
+ || (web1->type != PRECOLORED
+ && web1->crosses_call != web2->crosses_call)
+ || (web1->type != PRECOLORED
+ && web1->live_over_abnormal != web2->live_over_abnormal))
abort ();
if (web1->type != PRECOLORED)
{
oldwebs can't have their references changed. The
incremental machinery barfs on that. */
|| (!rtx_unstable_p (src) && !contains_pseudo (src))
- /* Additionally also memrefs to stack-slots are usefull, when
+ /* Additionally also memrefs to stack-slots are useful, when
we created them ourself. They might not have set their
unchanging flag set, but nevertheless they are stable across
the livetime in question. */