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 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 | 858 |
859 Node* success_output = NodeProperties::FindProjection(node, 1); | 859 Node* success_output = NodeProperties::FindProjection(node, 1); |
860 if (success_output) { | 860 if (success_output) { |
861 outputs[output_count++] = g.DefineAsRegister(success_output); | 861 outputs[output_count++] = g.DefineAsRegister(success_output); |
862 } | 862 } |
863 | 863 |
864 Emit(kSSEFloat64ToInt64, output_count, outputs, 1, inputs); | 864 Emit(kSSEFloat64ToInt64, output_count, outputs, 1, inputs); |
865 } | 865 } |
866 | 866 |
867 | 867 |
868 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) { | 868 void InstructionSelector::VisitTryTruncateFloat32ToUint64(Node* node) { |
869 X64OperandGenerator g(this); | 869 X64OperandGenerator g(this); |
870 Emit(kSSEFloat32ToUint64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 870 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; |
| 871 InstructionOperand outputs[2]; |
| 872 size_t output_count = 0; |
| 873 outputs[output_count++] = g.DefineAsRegister(node); |
| 874 |
| 875 Node* success_output = NodeProperties::FindProjection(node, 1); |
| 876 if (success_output) { |
| 877 outputs[output_count++] = g.DefineAsRegister(success_output); |
| 878 } |
| 879 |
| 880 Emit(kSSEFloat32ToUint64, output_count, outputs, 1, inputs); |
871 } | 881 } |
872 | 882 |
873 | 883 |
874 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) { | 884 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) { |
875 X64OperandGenerator g(this); | 885 X64OperandGenerator g(this); |
876 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; | 886 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; |
877 InstructionOperand outputs[2]; | 887 InstructionOperand outputs[2]; |
878 size_t output_count = 0; | 888 size_t output_count = 0; |
879 outputs[output_count++] = g.DefineAsRegister(node); | 889 outputs[output_count++] = g.DefineAsRegister(node); |
880 | 890 |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1760 MachineOperatorBuilder::kFloat64RoundTruncate | | 1770 MachineOperatorBuilder::kFloat64RoundTruncate | |
1761 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1771 MachineOperatorBuilder::kFloat32RoundTiesEven | |
1762 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1772 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1763 } | 1773 } |
1764 return flags; | 1774 return flags; |
1765 } | 1775 } |
1766 | 1776 |
1767 } // namespace compiler | 1777 } // namespace compiler |
1768 } // namespace internal | 1778 } // namespace internal |
1769 } // namespace v8 | 1779 } // namespace v8 |
OLD | NEW |