mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[JAEGER] Fixed bug in JSOP_POS.
This commit is contained in:
parent
bcde0f1fc6
commit
3487c67a9d
@ -686,6 +686,27 @@ FrameState::dataRematInfo(const FrameEntry *fe) const
|
||||
return remat;
|
||||
}
|
||||
|
||||
inline void
|
||||
FrameState::giveOwnRegs(FrameEntry *fe)
|
||||
{
|
||||
JS_ASSERT(!fe->isConstant());
|
||||
JS_ASSERT(fe == peek(-1));
|
||||
|
||||
if (!fe->isCopy())
|
||||
return;
|
||||
|
||||
RegisterID data = copyDataIntoReg(fe);
|
||||
if (fe->isTypeKnown()) {
|
||||
JSValueType type = fe->getKnownType();
|
||||
pop();
|
||||
pushTypedPayload(type, data);
|
||||
} else {
|
||||
RegisterID type = copyTypeIntoReg(fe);
|
||||
pop();
|
||||
pushRegs(type, data);
|
||||
}
|
||||
}
|
||||
|
||||
} /* namspace mjit */
|
||||
} /* namspace js */
|
||||
|
||||
|
@ -489,6 +489,12 @@ class FrameState
|
||||
*/
|
||||
inline void dupAt(int32 n);
|
||||
|
||||
/*
|
||||
* If the frameentry is a copy, give it its own registers.
|
||||
* This may only be called on the topmost fe.
|
||||
*/
|
||||
inline void giveOwnRegs(FrameEntry *fe);
|
||||
|
||||
/*
|
||||
* Returns the current stack depth of the frame.
|
||||
*/
|
||||
|
@ -178,6 +178,16 @@ class Assembler : public BaseAssembler
|
||||
return branch32(cond, tagOf(address), ImmTag(JSVAL_TAG_INT32));
|
||||
}
|
||||
|
||||
Jump testNumber(Assembler::Condition cond, RegisterID reg) {
|
||||
cond = (cond == Assembler::Equal) ? Assembler::BelowOrEqual : Assembler::Above;
|
||||
return branch32(cond, reg, ImmTag(JSVAL_TAG_INT32));
|
||||
}
|
||||
|
||||
Jump testNumber(Assembler::Condition cond, Address address) {
|
||||
cond = (cond == Assembler::Equal) ? Assembler::BelowOrEqual : Assembler::Above;
|
||||
return branch32(cond, tagOf(address), ImmTag(JSVAL_TAG_INT32));
|
||||
}
|
||||
|
||||
Jump testPrimitive(Assembler::Condition cond, RegisterID reg) {
|
||||
cond = (cond == Assembler::NotEqual) ? Assembler::AboveOrEqual : Assembler::Below;
|
||||
return branch32(cond, reg, ImmTag(JSVAL_TAG_OBJECT));
|
||||
|
@ -1215,11 +1215,13 @@ mjit::Compiler::jsop_pos()
|
||||
return;
|
||||
}
|
||||
|
||||
frame.giveOwnRegs(top);
|
||||
|
||||
Jump j;
|
||||
if (frame.shouldAvoidTypeRemat(top))
|
||||
j = masm.branch32(Assembler::GreaterThan, frame.addressOf(top), ImmTag(JSVAL_TAG_INT32));
|
||||
j = masm.testNumber(Assembler::NotEqual, frame.addressOf(top));
|
||||
else
|
||||
j = masm.branch32(Assembler::GreaterThan, frame.tempRegForType(top), ImmTag(JSVAL_TAG_INT32));
|
||||
j = masm.testNumber(Assembler::NotEqual, frame.tempRegForType(top));
|
||||
stubcc.linkExit(j);
|
||||
|
||||
stubcc.leave();
|
||||
|
Loading…
Reference in New Issue
Block a user