Fix edge case where leftover pushes would occasionally cause infinite loops in

the analysis.
This commit is contained in:
David Given 2016-10-01 23:41:35 +02:00
parent 73d7e89c32
commit 65e75be42d

View file

@ -107,6 +107,11 @@ static void convert_block(struct procedure* proc, struct basicblock* bb)
}
}
/* If we didn't actually find anything, give up. */
if ((pushes.count == 0) || (pops.count == 0))
return;
/* Okay, now we can wire them all up. */
for (i=0; i<pushes.count; i++)