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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 | 869 |
870 Emit(kMips64TruncLD, output_count, outputs, 1, inputs); | 870 Emit(kMips64TruncLD, output_count, outputs, 1, inputs); |
871 } | 871 } |
872 | 872 |
873 | 873 |
874 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) { | 874 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) { |
875 VisitRR(this, kMips64TruncUlS, node); | 875 VisitRR(this, kMips64TruncUlS, node); |
876 } | 876 } |
877 | 877 |
878 | 878 |
879 void InstructionSelector::VisitTruncateFloat64ToUint64(Node* node) { | 879 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) { |
880 VisitRR(this, kMips64TruncUlD, node); | 880 Mips64OperandGenerator g(this); |
| 881 |
| 882 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; |
| 883 InstructionOperand outputs[2]; |
| 884 size_t output_count = 0; |
| 885 outputs[output_count++] = g.DefineAsRegister(node); |
| 886 |
| 887 Node* success_output = NodeProperties::FindProjection(node, 1); |
| 888 if (success_output) { |
| 889 outputs[output_count++] = g.DefineAsRegister(success_output); |
| 890 } |
| 891 |
| 892 Emit(kMips64TruncUlD, output_count, outputs, 1, inputs); |
881 } | 893 } |
882 | 894 |
883 | 895 |
884 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { | 896 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { |
885 Mips64OperandGenerator g(this); | 897 Mips64OperandGenerator g(this); |
886 Emit(kMips64Shl, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), | 898 Emit(kMips64Shl, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), |
887 g.TempImmediate(0)); | 899 g.TempImmediate(0)); |
888 } | 900 } |
889 | 901 |
890 | 902 |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1754 MachineOperatorBuilder::kFloat32RoundUp | | 1766 MachineOperatorBuilder::kFloat32RoundUp | |
1755 MachineOperatorBuilder::kFloat64RoundTruncate | | 1767 MachineOperatorBuilder::kFloat64RoundTruncate | |
1756 MachineOperatorBuilder::kFloat32RoundTruncate | | 1768 MachineOperatorBuilder::kFloat32RoundTruncate | |
1757 MachineOperatorBuilder::kFloat64RoundTiesEven | | 1769 MachineOperatorBuilder::kFloat64RoundTiesEven | |
1758 MachineOperatorBuilder::kFloat32RoundTiesEven; | 1770 MachineOperatorBuilder::kFloat32RoundTiesEven; |
1759 } | 1771 } |
1760 | 1772 |
1761 } // namespace compiler | 1773 } // namespace compiler |
1762 } // namespace internal | 1774 } // namespace internal |
1763 } // namespace v8 | 1775 } // namespace v8 |
OLD | NEW |