Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index 8231c4e8b718f8479ca90c1e329f3a9b725eaa29..c16ada1afbf3a49bb40722a0b18841f9b7288c58 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -1578,7 +1578,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); |
@@ -2038,6 +2048,18 @@ LInstruction* LChunkBuilder::DoCheckHeapObject(HCheckHeapObject* 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(); |