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 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 | 849 |
850 Node* success_output = NodeProperties::FindProjection(node, 1); | 850 Node* success_output = NodeProperties::FindProjection(node, 1); |
851 if (success_output) { | 851 if (success_output) { |
852 outputs[output_count++] = g.DefineAsRegister(success_output); | 852 outputs[output_count++] = g.DefineAsRegister(success_output); |
853 } | 853 } |
854 | 854 |
855 Emit(kSSEFloat64ToInt64, output_count, outputs, 1, inputs); | 855 Emit(kSSEFloat64ToInt64, output_count, outputs, 1, inputs); |
856 } | 856 } |
857 | 857 |
858 | 858 |
859 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) { | 859 void InstructionSelector::VisitTryTruncateFloat32ToUint64(Node* node) { |
860 X64OperandGenerator g(this); | 860 X64OperandGenerator g(this); |
861 Emit(kSSEFloat32ToUint64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 861 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; |
| 862 InstructionOperand outputs[2]; |
| 863 size_t output_count = 0; |
| 864 outputs[output_count++] = g.DefineAsRegister(node); |
| 865 |
| 866 Node* success_output = NodeProperties::FindProjection(node, 1); |
| 867 if (success_output) { |
| 868 outputs[output_count++] = g.DefineAsRegister(success_output); |
| 869 } |
| 870 |
| 871 Emit(kSSEFloat32ToUint64, output_count, outputs, 1, inputs); |
862 } | 872 } |
863 | 873 |
864 | 874 |
865 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) { | 875 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) { |
866 X64OperandGenerator g(this); | 876 X64OperandGenerator g(this); |
867 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; | 877 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; |
868 InstructionOperand outputs[2]; | 878 InstructionOperand outputs[2]; |
869 size_t output_count = 0; | 879 size_t output_count = 0; |
870 outputs[output_count++] = g.DefineAsRegister(node); | 880 outputs[output_count++] = g.DefineAsRegister(node); |
871 | 881 |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1751 MachineOperatorBuilder::kFloat64RoundTruncate | | 1761 MachineOperatorBuilder::kFloat64RoundTruncate | |
1752 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1762 MachineOperatorBuilder::kFloat32RoundTiesEven | |
1753 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1763 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1754 } | 1764 } |
1755 return flags; | 1765 return flags; |
1756 } | 1766 } |
1757 | 1767 |
1758 } // namespace compiler | 1768 } // namespace compiler |
1759 } // namespace internal | 1769 } // namespace internal |
1760 } // namespace v8 | 1770 } // namespace v8 |
OLD | NEW |