mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1116646 - Avoid assertion when running out of virtual registers, r=jandem.
This commit is contained in:
parent
11a3161f3a
commit
b8b1df6dc1
@ -166,8 +166,11 @@ class LIRGeneratorShared : public MDefinitionVisitor
|
||||
|
||||
uint32_t getVirtualRegister() {
|
||||
uint32_t vreg = lirGraph_.getVirtualRegister();
|
||||
if (vreg >= MAX_VIRTUAL_REGISTERS) {
|
||||
// Mark code generation as having failed, and return a dummy vreg.
|
||||
|
||||
// If we run out of virtual registers, mark code generation as having
|
||||
// failed and return a dummy vreg. Include a + 1 here for NUNBOX32
|
||||
// platforms that expect Value vregs to be adjacent.
|
||||
if (vreg + 1 >= MAX_VIRTUAL_REGISTERS) {
|
||||
gen->abort("max virtual registers");
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user