| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
| 6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
| 7 #include "src/compiler/node-properties-inl.h" | 7 #include "src/compiler/node-properties-inl.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 | 369 |
| 370 | 370 |
| 371 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { | 371 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { |
| 372 IA32OperandGenerator g(this); | 372 IA32OperandGenerator g(this); |
| 373 Emit(kSSEFloat64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 373 Emit(kSSEFloat64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 374 } | 374 } |
| 375 | 375 |
| 376 | 376 |
| 377 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { | 377 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { |
| 378 IA32OperandGenerator g(this); | 378 IA32OperandGenerator g(this); |
| 379 // TODO(turbofan): IA32 SSE subsd() should take an operand. | 379 Emit(kSSEFloat64ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 380 Emit(kSSEFloat64ToUint32, g.DefineAsRegister(node), | |
| 381 g.UseRegister(node->InputAt(0))); | |
| 382 } | 380 } |
| 383 | 381 |
| 384 | 382 |
| 385 void InstructionSelector::VisitFloat64Add(Node* node) { | 383 void InstructionSelector::VisitFloat64Add(Node* node) { |
| 386 IA32OperandGenerator g(this); | 384 IA32OperandGenerator g(this); |
| 387 Emit(kSSEFloat64Add, g.DefineSameAsFirst(node), | 385 Emit(kSSEFloat64Add, g.DefineSameAsFirst(node), |
| 388 g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); | 386 g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1))); |
| 389 } | 387 } |
| 390 | 388 |
| 391 | 389 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 if (descriptor->kind() == CallDescriptor::kCallAddress && | 558 if (descriptor->kind() == CallDescriptor::kCallAddress && |
| 561 buffer.pushed_nodes.size() > 0) { | 559 buffer.pushed_nodes.size() > 0) { |
| 562 DCHECK(deoptimization == NULL && continuation == NULL); | 560 DCHECK(deoptimization == NULL && continuation == NULL); |
| 563 Emit(kArchDrop | MiscField::encode(buffer.pushed_nodes.size()), NULL); | 561 Emit(kArchDrop | MiscField::encode(buffer.pushed_nodes.size()), NULL); |
| 564 } | 562 } |
| 565 } | 563 } |
| 566 | 564 |
| 567 } // namespace compiler | 565 } // namespace compiler |
| 568 } // namespace internal | 566 } // namespace internal |
| 569 } // namespace v8 | 567 } // namespace v8 |
| OLD | NEW |