mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1005113 - IonMonkey: Mark more LUses as AtStart on x86/x64. r=bhackett
This commit is contained in:
parent
ebe975d874
commit
143a8064bc
@ -292,6 +292,14 @@ LIRGeneratorShared::useOrConstant(MDefinition *mir)
|
|||||||
return use(mir);
|
return use(mir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LAllocation
|
||||||
|
LIRGeneratorShared::useOrConstantAtStart(MDefinition *mir)
|
||||||
|
{
|
||||||
|
if (mir->isConstant())
|
||||||
|
return LAllocation(mir->toConstant()->vp());
|
||||||
|
return useAtStart(mir);
|
||||||
|
}
|
||||||
|
|
||||||
LAllocation
|
LAllocation
|
||||||
LIRGeneratorShared::useRegisterOrConstant(MDefinition *mir)
|
LIRGeneratorShared::useRegisterOrConstant(MDefinition *mir)
|
||||||
{
|
{
|
||||||
|
@ -76,6 +76,7 @@ class LIRGeneratorShared : public MInstructionVisitorWithDefaults
|
|||||||
inline LUse useFixed(MDefinition *mir, AnyRegister reg);
|
inline LUse useFixed(MDefinition *mir, AnyRegister reg);
|
||||||
inline LUse useFixedAtStart(MDefinition *mir, Register reg);
|
inline LUse useFixedAtStart(MDefinition *mir, Register reg);
|
||||||
inline LAllocation useOrConstant(MDefinition *mir);
|
inline LAllocation useOrConstant(MDefinition *mir);
|
||||||
|
inline LAllocation useOrConstantAtStart(MDefinition *mir);
|
||||||
// "Any" is architecture dependent, and will include registers and stack slots on X86,
|
// "Any" is architecture dependent, and will include registers and stack slots on X86,
|
||||||
// and only registers on ARM.
|
// and only registers on ARM.
|
||||||
inline LAllocation useAny(MDefinition *mir);
|
inline LAllocation useAny(MDefinition *mir);
|
||||||
|
@ -36,7 +36,7 @@ LIRGeneratorX86Shared::visitGuardShape(MGuardShape *ins)
|
|||||||
{
|
{
|
||||||
JS_ASSERT(ins->obj()->type() == MIRType_Object);
|
JS_ASSERT(ins->obj()->type() == MIRType_Object);
|
||||||
|
|
||||||
LGuardShape *guard = new(alloc()) LGuardShape(useRegister(ins->obj()));
|
LGuardShape *guard = new(alloc()) LGuardShape(useRegisterAtStart(ins->obj()));
|
||||||
if (!assignSnapshot(guard, ins->bailoutKind()))
|
if (!assignSnapshot(guard, ins->bailoutKind()))
|
||||||
return false;
|
return false;
|
||||||
if (!add(guard, ins))
|
if (!add(guard, ins))
|
||||||
@ -49,7 +49,7 @@ LIRGeneratorX86Shared::visitGuardObjectType(MGuardObjectType *ins)
|
|||||||
{
|
{
|
||||||
JS_ASSERT(ins->obj()->type() == MIRType_Object);
|
JS_ASSERT(ins->obj()->type() == MIRType_Object);
|
||||||
|
|
||||||
LGuardObjectType *guard = new(alloc()) LGuardObjectType(useRegister(ins->obj()));
|
LGuardObjectType *guard = new(alloc()) LGuardObjectType(useRegisterAtStart(ins->obj()));
|
||||||
if (!assignSnapshot(guard))
|
if (!assignSnapshot(guard))
|
||||||
return false;
|
return false;
|
||||||
if (!add(guard, ins))
|
if (!add(guard, ins))
|
||||||
@ -75,9 +75,9 @@ LIRGeneratorX86Shared::lowerForShift(LInstructionHelper<1, 2, 0> *ins, MDefiniti
|
|||||||
// shift operator should be constant or in register ecx
|
// shift operator should be constant or in register ecx
|
||||||
// x86 can't shift a non-ecx register
|
// x86 can't shift a non-ecx register
|
||||||
if (rhs->isConstant())
|
if (rhs->isConstant())
|
||||||
ins->setOperand(1, useOrConstant(rhs));
|
ins->setOperand(1, useOrConstantAtStart(rhs));
|
||||||
else
|
else
|
||||||
ins->setOperand(1, useFixed(rhs, ecx));
|
ins->setOperand(1, lhs != rhs ? useFixed(rhs, ecx) : useFixedAtStart(rhs, ecx));
|
||||||
|
|
||||||
return defineReuseInput(ins, mir, 0);
|
return defineReuseInput(ins, mir, 0);
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ LIRGeneratorX86Shared::lowerForALU(LInstructionHelper<1, 2, 0> *ins, MDefinition
|
|||||||
MDefinition *lhs, MDefinition *rhs)
|
MDefinition *lhs, MDefinition *rhs)
|
||||||
{
|
{
|
||||||
ins->setOperand(0, useRegisterAtStart(lhs));
|
ins->setOperand(0, useRegisterAtStart(lhs));
|
||||||
ins->setOperand(1, useOrConstant(rhs));
|
ins->setOperand(1, lhs != rhs ? useOrConstant(rhs) : useOrConstantAtStart(rhs));
|
||||||
return defineReuseInput(ins, mir, 0);
|
return defineReuseInput(ins, mir, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ bool
|
|||||||
LIRGeneratorX86Shared::lowerForFPU(LInstructionHelper<1, 2, 0> *ins, MDefinition *mir, MDefinition *lhs, MDefinition *rhs)
|
LIRGeneratorX86Shared::lowerForFPU(LInstructionHelper<1, 2, 0> *ins, MDefinition *mir, MDefinition *lhs, MDefinition *rhs)
|
||||||
{
|
{
|
||||||
ins->setOperand(0, useRegisterAtStart(lhs));
|
ins->setOperand(0, useRegisterAtStart(lhs));
|
||||||
ins->setOperand(1, use(rhs));
|
ins->setOperand(1, lhs != rhs ? use(rhs) : useAtStart(rhs));
|
||||||
return defineReuseInput(ins, mir, 0);
|
return defineReuseInput(ins, mir, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,7 +293,7 @@ LIRGeneratorX86Shared::lowerTruncateDToInt32(MTruncateToInt32 *ins)
|
|||||||
JS_ASSERT(opd->type() == MIRType_Double);
|
JS_ASSERT(opd->type() == MIRType_Double);
|
||||||
|
|
||||||
LDefinition maybeTemp = Assembler::HasSSE3() ? LDefinition::BogusTemp() : tempDouble();
|
LDefinition maybeTemp = Assembler::HasSSE3() ? LDefinition::BogusTemp() : tempDouble();
|
||||||
return define(new(alloc()) LTruncateDToInt32(useRegister(opd), maybeTemp), ins);
|
return define(new(alloc()) LTruncateDToInt32(useRegisterAtStart(opd), maybeTemp), ins);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
@ -303,7 +303,7 @@ LIRGeneratorX86Shared::lowerTruncateFToInt32(MTruncateToInt32 *ins)
|
|||||||
JS_ASSERT(opd->type() == MIRType_Float32);
|
JS_ASSERT(opd->type() == MIRType_Float32);
|
||||||
|
|
||||||
LDefinition maybeTemp = Assembler::HasSSE3() ? LDefinition::BogusTemp() : tempFloat32();
|
LDefinition maybeTemp = Assembler::HasSSE3() ? LDefinition::BogusTemp() : tempFloat32();
|
||||||
return define(new(alloc()) LTruncateFToInt32(useRegister(opd), maybeTemp), ins);
|
return define(new(alloc()) LTruncateFToInt32(useRegisterAtStart(opd), maybeTemp), ins);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
Loading…
Reference in New Issue
Block a user