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 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 Emit(kSSEFloat64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 850 Emit(kSSEFloat64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
851 } | 851 } |
852 | 852 |
853 | 853 |
854 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { | 854 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { |
855 X64OperandGenerator g(this); | 855 X64OperandGenerator g(this); |
856 Emit(kSSEFloat64ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 856 Emit(kSSEFloat64ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
857 } | 857 } |
858 | 858 |
859 | 859 |
| 860 void InstructionSelector::VisitTruncateFloat32ToInt32(Node* node) { |
| 861 X64OperandGenerator g(this); |
| 862 Emit(kSSEFloat32ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 863 } |
| 864 |
| 865 |
860 void InstructionSelector::VisitTryTruncateFloat32ToInt64(Node* node) { | 866 void InstructionSelector::VisitTryTruncateFloat32ToInt64(Node* node) { |
861 X64OperandGenerator g(this); | 867 X64OperandGenerator g(this); |
862 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; | 868 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; |
863 InstructionOperand outputs[2]; | 869 InstructionOperand outputs[2]; |
864 size_t output_count = 0; | 870 size_t output_count = 0; |
865 outputs[output_count++] = g.DefineAsRegister(node); | 871 outputs[output_count++] = g.DefineAsRegister(node); |
866 | 872 |
867 Node* success_output = NodeProperties::FindProjection(node, 1); | 873 Node* success_output = NodeProperties::FindProjection(node, 1); |
868 if (success_output) { | 874 if (success_output) { |
869 outputs[output_count++] = g.DefineAsRegister(success_output); | 875 outputs[output_count++] = g.DefineAsRegister(success_output); |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 MachineOperatorBuilder::kFloat64RoundTruncate | | 1807 MachineOperatorBuilder::kFloat64RoundTruncate | |
1802 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1808 MachineOperatorBuilder::kFloat32RoundTiesEven | |
1803 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1809 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1804 } | 1810 } |
1805 return flags; | 1811 return flags; |
1806 } | 1812 } |
1807 | 1813 |
1808 } // namespace compiler | 1814 } // namespace compiler |
1809 } // namespace internal | 1815 } // namespace internal |
1810 } // namespace v8 | 1816 } // namespace v8 |
OLD | NEW |