| Index: src/ia32/lithium-ia32.cc
|
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
|
| index 96fbc8a04f397bf3c663d1b92b909b74caca551a..3d81c312d5af6cb17065ba5dda422dbbcd5a8673 100644
|
| --- a/src/ia32/lithium-ia32.cc
|
| +++ b/src/ia32/lithium-ia32.cc
|
| @@ -1605,7 +1605,17 @@ LInstruction* LChunkBuilder::DoMul(HMul* instr) {
|
| }
|
| return DefineSameAsFirst(mul);
|
| } else if (instr->representation().IsDouble()) {
|
| - return DoArithmeticD(Token::MUL, instr);
|
| + if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
|
| + return DoArithmeticD(Token::MUL, instr);
|
| + }
|
| + ASSERT(instr->right()->IsConstant() &&
|
| + static_cast<HConstant*>(instr->right())->DoubleValue() == -1);
|
| + // TODO(olivf) This is currently just a hack to support the UnaryOp Minus
|
| + // Stub. This will go away once we can use more than one X87 register,
|
| + // thus fully support binary instructions without SSE2.
|
| + LOperand* left = UseX87TopOfStack(instr->left());
|
| + LNegateNoSSE2D* result = new(zone()) LNegateNoSSE2D(left);
|
| + return DefineX87TOS(result);
|
| } else {
|
| ASSERT(instr->representation().IsSmiOrTagged());
|
| return DoArithmeticT(Token::MUL, instr);
|
| @@ -2070,6 +2080,18 @@ LInstruction* LChunkBuilder::DoCheckNonSmi(HCheckNonSmi* instr) {
|
| }
|
|
|
|
|
| +LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) {
|
| + LOperand* value = UseRegisterAtStart(instr->value());
|
| + return AssignEnvironment(new(zone()) LCheckSmi(value));
|
| +}
|
| +
|
| +
|
| +LInstruction* LChunkBuilder::DoIsNumberAndBranch(HIsNumberAndBranch* instr) {
|
| + return new(zone())
|
| + LIsNumberAndBranch(UseRegisterOrConstantAtStart(instr->value()));
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
|
| LOperand* value = UseRegisterAtStart(instr->value());
|
| LOperand* temp = TempRegister();
|
|
|