Fixed a register allocation bug in nanojit when an argument using FST0 appeared twice in an argument list (bug 465484, r=edwsmith).

This commit is contained in:
David Anderson 2008-12-04 12:34:38 -08:00
parent 14bfd2d9ab
commit ed25d09ae1

View File

@ -1604,6 +1604,11 @@ namespace nanojit
SSE_STQ(0, SP, r);
} else {
FSTPQ(0, SP);
/* It's possible that the same LIns* with r=FST0 will appear in the argument list more
* than once. In this case FST0 will not have been evicted and the multiple pop
* actions will unbalance the FPU stack. A quick fix is to always evict FST0 manually.
*/
evict(FST0);
}
SUBi(ESP,8);
//PUSHr(ECX); // 2*pushr is smaller than sub