| 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/base/adapters.h" | 5 #include "src/base/adapters.h" |
| 6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
| 7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
| 8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 switch (TruncationModeOf(node->op())) { | 680 switch (TruncationModeOf(node->op())) { |
| 681 case TruncationMode::kJavaScript: | 681 case TruncationMode::kJavaScript: |
| 682 return VisitRR(this, node, kArchTruncateDoubleToI); | 682 return VisitRR(this, node, kArchTruncateDoubleToI); |
| 683 case TruncationMode::kRoundToZero: | 683 case TruncationMode::kRoundToZero: |
| 684 return VisitRO(this, node, kSSEFloat64ToInt32); | 684 return VisitRO(this, node, kSSEFloat64ToInt32); |
| 685 } | 685 } |
| 686 UNREACHABLE(); | 686 UNREACHABLE(); |
| 687 } | 687 } |
| 688 | 688 |
| 689 | 689 |
| 690 void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { |
| 691 IA32OperandGenerator g(this); |
| 692 Emit(kIA32BitcastFI, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 693 } |
| 694 |
| 695 |
| 696 void InstructionSelector::VisitBitcastInt32ToFloat32(Node* node) { |
| 697 IA32OperandGenerator g(this); |
| 698 Emit(kIA32BitcastIF, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 699 } |
| 700 |
| 701 |
| 690 void InstructionSelector::VisitFloat32Add(Node* node) { | 702 void InstructionSelector::VisitFloat32Add(Node* node) { |
| 691 VisitRROFloat(this, node, kAVXFloat32Add, kSSEFloat32Add); | 703 VisitRROFloat(this, node, kAVXFloat32Add, kSSEFloat32Add); |
| 692 } | 704 } |
| 693 | 705 |
| 694 | 706 |
| 695 void InstructionSelector::VisitFloat64Add(Node* node) { | 707 void InstructionSelector::VisitFloat64Add(Node* node) { |
| 696 VisitRROFloat(this, node, kAVXFloat64Add, kSSEFloat64Add); | 708 VisitRROFloat(this, node, kAVXFloat64Add, kSSEFloat64Add); |
| 697 } | 709 } |
| 698 | 710 |
| 699 | 711 |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 if (CpuFeatures::IsSupported(SSE4_1)) { | 1361 if (CpuFeatures::IsSupported(SSE4_1)) { |
| 1350 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1362 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
| 1351 MachineOperatorBuilder::kFloat64RoundTruncate; | 1363 MachineOperatorBuilder::kFloat64RoundTruncate; |
| 1352 } | 1364 } |
| 1353 return flags; | 1365 return flags; |
| 1354 } | 1366 } |
| 1355 | 1367 |
| 1356 } // namespace compiler | 1368 } // namespace compiler |
| 1357 } // namespace internal | 1369 } // namespace internal |
| 1358 } // namespace v8 | 1370 } // namespace v8 |
| OLD | NEW |