| 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 <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "src/base/adapters.h" | 7 #include "src/base/adapters.h" |
| 8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 Emit(kSSEFloat32ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 768 Emit(kSSEFloat32ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 769 } | 769 } |
| 770 | 770 |
| 771 | 771 |
| 772 void InstructionSelector::VisitChangeInt32ToFloat64(Node* node) { | 772 void InstructionSelector::VisitChangeInt32ToFloat64(Node* node) { |
| 773 X64OperandGenerator g(this); | 773 X64OperandGenerator g(this); |
| 774 Emit(kSSEInt32ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 774 Emit(kSSEInt32ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 775 } | 775 } |
| 776 | 776 |
| 777 | 777 |
| 778 void InstructionSelector::VisitRoundInt64ToFloat64(Node* node) { |
| 779 X64OperandGenerator g(this); |
| 780 Emit(kSSEInt64ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 781 } |
| 782 |
| 783 |
| 778 void InstructionSelector::VisitChangeUint32ToFloat64(Node* node) { | 784 void InstructionSelector::VisitChangeUint32ToFloat64(Node* node) { |
| 779 X64OperandGenerator g(this); | 785 X64OperandGenerator g(this); |
| 780 Emit(kSSEUint32ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 786 Emit(kSSEUint32ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 781 } | 787 } |
| 782 | 788 |
| 783 | 789 |
| 784 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { | 790 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { |
| 785 X64OperandGenerator g(this); | 791 X64OperandGenerator g(this); |
| 786 Emit(kSSEFloat64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 792 Emit(kSSEFloat64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 787 } | 793 } |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 if (CpuFeatures::IsSupported(SSE4_1)) { | 1607 if (CpuFeatures::IsSupported(SSE4_1)) { |
| 1602 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1608 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
| 1603 MachineOperatorBuilder::kFloat64RoundTruncate; | 1609 MachineOperatorBuilder::kFloat64RoundTruncate; |
| 1604 } | 1610 } |
| 1605 return flags; | 1611 return flags; |
| 1606 } | 1612 } |
| 1607 | 1613 |
| 1608 } // namespace compiler | 1614 } // namespace compiler |
| 1609 } // namespace internal | 1615 } // namespace internal |
| 1610 } // namespace v8 | 1616 } // namespace v8 |
| OLD | NEW |