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 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 X87OperandGenerator g(this); | 837 X87OperandGenerator g(this); |
838 Emit(kX87Float64ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 838 Emit(kX87Float64ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
839 } | 839 } |
840 | 840 |
841 void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { | 841 void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { |
842 X87OperandGenerator g(this); | 842 X87OperandGenerator g(this); |
843 Emit(kX87Float64ToFloat32, g.DefineAsFixed(node, stX_0), | 843 Emit(kX87Float64ToFloat32, g.DefineAsFixed(node, stX_0), |
844 g.Use(node->InputAt(0))); | 844 g.Use(node->InputAt(0))); |
845 } | 845 } |
846 | 846 |
847 | 847 void InstructionSelector::VisitTruncateFloat64ToWord32(Node* node) { |
848 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) { | |
849 X87OperandGenerator g(this); | 848 X87OperandGenerator g(this); |
850 | 849 |
851 switch (TruncationModeOf(node->op())) { | 850 switch (TruncationModeOf(node->op())) { |
852 case TruncationMode::kJavaScript: | 851 case TruncationMode::kJavaScript: |
853 Emit(kArchTruncateDoubleToI, g.DefineAsRegister(node), | 852 Emit(kArchTruncateDoubleToI, g.DefineAsRegister(node), |
854 g.Use(node->InputAt(0))); | 853 g.Use(node->InputAt(0))); |
855 return; | 854 return; |
856 case TruncationMode::kRoundToZero: | 855 case TruncationMode::kRoundToZero: |
857 Emit(kX87Float64ToInt32, g.DefineAsRegister(node), | 856 Emit(kX87Float64ToInt32, g.DefineAsRegister(node), |
858 g.Use(node->InputAt(0))); | 857 g.Use(node->InputAt(0))); |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1619 MachineOperatorBuilder::kFloat32RoundTruncate | | 1618 MachineOperatorBuilder::kFloat32RoundTruncate | |
1620 MachineOperatorBuilder::kFloat64RoundTruncate | | 1619 MachineOperatorBuilder::kFloat64RoundTruncate | |
1621 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1620 MachineOperatorBuilder::kFloat32RoundTiesEven | |
1622 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1621 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1623 return flags; | 1622 return flags; |
1624 } | 1623 } |
1625 | 1624 |
1626 } // namespace compiler | 1625 } // namespace compiler |
1627 } // namespace internal | 1626 } // namespace internal |
1628 } // namespace v8 | 1627 } // namespace v8 |
OLD | NEW |