Chromium Code Reviews| Index: src/ia32/lithium-ia32.cc |
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
| index 96fbc8a04f397bf3c663d1b92b909b74caca551a..95dedd144ca0971f22c9b0757e5d0375c54df829 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() && |
|
danno
2013/06/27 13:31:06
Shouldn't you use BetterRightOperand here and on t
oliv
2013/06/27 17:20:48
Actually not, since i know the stub passes the con
|
| + 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->BetterLeftOperand()); |
| + 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(); |