Follow-up assertion failure fix for bug 517910. r=me.

--HG--
extra : convert_revision : dfaf13aa4c5928bcd871ac7f279657c87de7b0f9
This commit is contained in:
Nicholas Nethercote 2010-03-23 15:49:12 -07:00
parent e1753664c8
commit fac2089f95

View File

@ -2304,10 +2304,18 @@ namespace nanojit
LIns* CseFilter::insStore(LOpcode op, LInsp value, LInsp base, int32_t disp, AccSet accSet) LIns* CseFilter::insStore(LOpcode op, LInsp value, LInsp base, int32_t disp, AccSet accSet)
{ {
storesSinceLastLoad |= accSet; LInsp ins;
LIns* ins = out->insStore(op, value, base, disp, accSet); if (isS16(disp)) {
NanoAssert(ins->isop(op) && ins->oprnd1() == value && ins->oprnd2() == base && storesSinceLastLoad |= accSet;
ins->disp() == disp && ins->accSet() == accSet); ins = out->insStore(op, value, base, disp, accSet);
NanoAssert(ins->isop(op) && ins->oprnd1() == value && ins->oprnd2() == base &&
ins->disp() == disp && ins->accSet() == accSet);
} else {
// If the displacement is more than 16 bits, put it in a separate
// instruction. Nb: LirBufWriter also does this, we do it here
// too because CseFilter relies on LirBufWriter not changing code.
ins = insStore(op, value, ins2(LIR_addp, base, insImmWord(disp)), 0, accSet);
}
return ins; return ins;
} }