Skip to content
Snippets Groups Projects
Commit a1de267a authored by Emma Anholt's avatar Emma Anholt Committed by Marge Bot
Browse files

util/ra: Sanity check that we're adding a valid reg to a class.


BITSET_SET might not segfault on you right away if you're just slightly
off, and an assert is nicer anyway.

Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
Part-of: <mesa/mesa!4537>
parent 5bcaf30a
No related branches found
No related tags found
No related merge requests found
......@@ -371,6 +371,8 @@ ra_class_add_reg(struct ra_regs *regs, unsigned int c, unsigned int r)
{
struct ra_class *class = regs->classes[c];
assert(r < regs->count);
BITSET_SET(class->regs, r);
class->p++;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment