i965: Add a sanity check for register allocation sizes.

This commit is contained in:
Eric Anholt 2010-10-01 16:35:55 -07:00
parent 5ee0941316
commit afb64311e3

View file

@ -2293,6 +2293,11 @@ fs_visitor::assign_regs()
break;
}
if (i == class_count) {
if (this->virtual_grf_sizes[r] >= base_reg_count) {
fprintf(stderr, "Object too large to register allocate.\n");
this->fail = true;
}
class_sizes[class_count++] = this->virtual_grf_sizes[r];
}
}