| 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/base/bits.h" | 6 #include "src/base/bits.h" |
| 7 #include "src/compiler/instruction-selector-impl.h" | 7 #include "src/compiler/instruction-selector-impl.h" |
| 8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 | 10 |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 } | 843 } |
| 844 VisitRR(this, kMips64TruncWD, node); | 844 VisitRR(this, kMips64TruncWD, node); |
| 845 } | 845 } |
| 846 | 846 |
| 847 | 847 |
| 848 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { | 848 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { |
| 849 VisitRR(this, kMips64TruncUwD, node); | 849 VisitRR(this, kMips64TruncUwD, node); |
| 850 } | 850 } |
| 851 | 851 |
| 852 | 852 |
| 853 void InstructionSelector::VisitTruncateFloat32ToInt64(Node* node) { | 853 void InstructionSelector::VisitTryTruncateFloat32ToInt64(Node* node) { |
| 854 VisitRR(this, kMips64TruncLS, node); | 854 Mips64OperandGenerator g(this); |
| 855 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; |
| 856 InstructionOperand outputs[2]; |
| 857 size_t output_count = 0; |
| 858 outputs[output_count++] = g.DefineAsRegister(node); |
| 859 |
| 860 Node* success_output = NodeProperties::FindProjection(node, 1); |
| 861 if (success_output) { |
| 862 outputs[output_count++] = g.DefineAsRegister(success_output); |
| 863 } |
| 864 |
| 865 this->Emit(kMips64TruncLS, output_count, outputs, 1, inputs); |
| 855 } | 866 } |
| 856 | 867 |
| 857 | 868 |
| 858 void InstructionSelector::VisitTryTruncateFloat64ToInt64(Node* node) { | 869 void InstructionSelector::VisitTryTruncateFloat64ToInt64(Node* node) { |
| 859 Mips64OperandGenerator g(this); | 870 Mips64OperandGenerator g(this); |
| 860 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; | 871 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; |
| 861 InstructionOperand outputs[2]; | 872 InstructionOperand outputs[2]; |
| 862 size_t output_count = 0; | 873 size_t output_count = 0; |
| 863 outputs[output_count++] = g.DefineAsRegister(node); | 874 outputs[output_count++] = g.DefineAsRegister(node); |
| 864 | 875 |
| (...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1766 MachineOperatorBuilder::kFloat32RoundUp | | 1777 MachineOperatorBuilder::kFloat32RoundUp | |
| 1767 MachineOperatorBuilder::kFloat64RoundTruncate | | 1778 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1768 MachineOperatorBuilder::kFloat32RoundTruncate | | 1779 MachineOperatorBuilder::kFloat32RoundTruncate | |
| 1769 MachineOperatorBuilder::kFloat64RoundTiesEven | | 1780 MachineOperatorBuilder::kFloat64RoundTiesEven | |
| 1770 MachineOperatorBuilder::kFloat32RoundTiesEven; | 1781 MachineOperatorBuilder::kFloat32RoundTiesEven; |
| 1771 } | 1782 } |
| 1772 | 1783 |
| 1773 } // namespace compiler | 1784 } // namespace compiler |
| 1774 } // namespace internal | 1785 } // namespace internal |
| 1775 } // namespace v8 | 1786 } // namespace v8 |
| OLD | NEW |