Bug 832079 - IonMonkey: common out MDiv lowering (r=dvander)

--HG--
extra : rebase_source : 5afa690efc26a859ceb980dddfeaa27a505cf9d6
This commit is contained in:
Luke Wagner 2012-12-07 18:54:05 -08:00
parent abe8490917
commit 7dfc3008fd
6 changed files with 8 additions and 17 deletions

View File

@ -76,6 +76,13 @@ LIRGeneratorX86Shared::lowerMulI(MMul *mul, MDefinition *lhs, MDefinition *rhs)
return defineReuseInput(lir, mul, 0);
}
bool
LIRGeneratorX86Shared::lowerDivI(MDiv *div)
{
LDivI *lir = new LDivI(useFixed(div->lhs(), eax), useRegister(div->rhs()), tempFixed(edx));
return assignSnapshot(lir) && defineFixed(lir, div, LAllocation(AnyRegister(eax)));
}
bool
LIRGeneratorX86Shared::lowerModI(MMod *mod)
{

View File

@ -29,6 +29,7 @@ class LIRGeneratorX86Shared : public LIRGeneratorShared
bool visitGuardShape(MGuardShape *ins);
bool visitPowHalf(MPowHalf *ins);
bool lowerMulI(MMul *mul, MDefinition *lhs, MDefinition *rhs);
bool lowerDivI(MDiv *div);
bool lowerModI(MMod *mod);
bool lowerUrshD(MUrsh *mir);
};

View File

@ -148,13 +148,6 @@ LIRGeneratorX64::lowerUntypedPhiInput(MPhi *phi, uint32_t inputPosition, LBlock
lowerTypedPhiInput(phi, inputPosition, block, lirIndex);
}
bool
LIRGeneratorX64::lowerDivI(MDiv *div)
{
LDivI *lir = new LDivI(useFixed(div->lhs(), rax), useRegister(div->rhs()), tempFixed(rdx));
return assignSnapshot(lir) && defineFixed(lir, div, LAllocation(AnyRegister(rax)));
}
bool
LIRGeneratorX64::visitStoreTypedArrayElement(MStoreTypedArrayElement *ins)
{

View File

@ -38,7 +38,6 @@ class LIRGeneratorX64 : public LIRGeneratorX86Shared
bool lowerForFPU(LMathD *ins, MDefinition *mir, MDefinition *lhs, MDefinition *rhs);
bool lowerConstantDouble(double d, MInstruction *ins);
bool lowerDivI(MDiv *div);
public:
bool visitConstant(MConstant *ins);

View File

@ -226,14 +226,6 @@ LIRGeneratorX86::lowerUntypedPhiInput(MPhi *phi, uint32_t inputPosition, LBlock
payload->setOperand(inputPosition, LUse(VirtualRegisterOfPayload(operand), LUse::ANY));
}
bool
LIRGeneratorX86::lowerDivI(MDiv *div)
{
LDivI *lir = new LDivI(useFixed(div->lhs(), eax), useRegister(div->rhs()), tempFixed(edx));
return assignSnapshot(lir) && defineFixed(lir, div, LAllocation(AnyRegister(eax)));
}
bool
LIRGeneratorX86::visitStoreTypedArrayElement(MStoreTypedArrayElement *ins)
{

View File

@ -40,7 +40,6 @@ class LIRGeneratorX86 : public LIRGeneratorX86Shared
MDefinition *rhs);
bool lowerConstantDouble(double d, MInstruction *ins);
bool lowerDivI(MDiv *div);
public:
bool visitConstant(MConstant *ins);