| 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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) { | 860 void InstructionSelector::VisitTruncateFloat32ToInt32(Node* node) { |
| 861 X64OperandGenerator g(this); | 861 X64OperandGenerator g(this); |
| 862 Emit(kSSEFloat32ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 862 Emit(kSSEFloat32ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 863 } | 863 } |
| 864 | 864 |
| 865 | 865 |
| 866 void InstructionSelector::VisitTruncateFloat32ToUint32(Node* node) { |
| 867 X64OperandGenerator g(this); |
| 868 Emit(kSSEFloat32ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 869 } |
| 870 |
| 871 |
| 866 void InstructionSelector::VisitTryTruncateFloat32ToInt64(Node* node) { | 872 void InstructionSelector::VisitTryTruncateFloat32ToInt64(Node* node) { |
| 867 X64OperandGenerator g(this); | 873 X64OperandGenerator g(this); |
| 868 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; | 874 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; |
| 869 InstructionOperand outputs[2]; | 875 InstructionOperand outputs[2]; |
| 870 size_t output_count = 0; | 876 size_t output_count = 0; |
| 871 outputs[output_count++] = g.DefineAsRegister(node); | 877 outputs[output_count++] = g.DefineAsRegister(node); |
| 872 | 878 |
| 873 Node* success_output = NodeProperties::FindProjection(node, 1); | 879 Node* success_output = NodeProperties::FindProjection(node, 1); |
| 874 if (success_output) { | 880 if (success_output) { |
| 875 outputs[output_count++] = g.DefineAsRegister(success_output); | 881 outputs[output_count++] = g.DefineAsRegister(success_output); |
| (...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1813 MachineOperatorBuilder::kFloat64RoundTruncate | | 1819 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1814 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1820 MachineOperatorBuilder::kFloat32RoundTiesEven | |
| 1815 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1821 MachineOperatorBuilder::kFloat64RoundTiesEven; |
| 1816 } | 1822 } |
| 1817 return flags; | 1823 return flags; |
| 1818 } | 1824 } |
| 1819 | 1825 |
| 1820 } // namespace compiler | 1826 } // namespace compiler |
| 1821 } // namespace internal | 1827 } // namespace internal |
| 1822 } // namespace v8 | 1828 } // namespace v8 |
| OLD | NEW |