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/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 #include "src/ppc/frames-ppc.h" | 9 #include "src/ppc/frames-ppc.h" |
10 | 10 |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 VisitRR(this, kPPC_DoubleToInt64, node); | 940 VisitRR(this, kPPC_DoubleToInt64, node); |
941 } | 941 } |
942 | 942 |
943 | 943 |
944 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) { | 944 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) { |
945 VisitRR(this, kPPC_DoubleToUint64, node); | 945 VisitRR(this, kPPC_DoubleToUint64, node); |
946 } | 946 } |
947 | 947 |
948 | 948 |
949 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) { | 949 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) { |
950 if (NodeProperties::FindProjection(node, 1)) { | 950 PPCOperandGenerator g(this); |
951 // TODO(ppc): implement the second return value. | 951 |
952 UNIMPLEMENTED(); | 952 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; |
| 953 InstructionOperand outputs[2]; |
| 954 size_t output_count = 0; |
| 955 outputs[output_count++] = g.DefineAsRegister(node); |
| 956 |
| 957 Node* success_output = NodeProperties::FindProjection(node, 1); |
| 958 if (success_output) { |
| 959 outputs[output_count++] = g.DefineAsRegister(success_output); |
953 } | 960 } |
954 VisitRR(this, kPPC_DoubleToUint64, node); | 961 |
| 962 Emit(kPPC_DoubleToUint64, output_count, outputs, 1, inputs); |
955 } | 963 } |
956 | 964 |
957 | 965 |
958 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { | 966 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { |
959 // TODO(mbrandy): inspect input to see if nop is appropriate. | 967 // TODO(mbrandy): inspect input to see if nop is appropriate. |
960 VisitRR(this, kPPC_ExtendSignWord32, node); | 968 VisitRR(this, kPPC_ExtendSignWord32, node); |
961 } | 969 } |
962 | 970 |
963 | 971 |
964 void InstructionSelector::VisitChangeUint32ToUint64(Node* node) { | 972 void InstructionSelector::VisitChangeUint32ToUint64(Node* node) { |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1703 MachineOperatorBuilder::kFloat64RoundTruncate | | 1711 MachineOperatorBuilder::kFloat64RoundTruncate | |
1704 MachineOperatorBuilder::kFloat64RoundTiesAway | | 1712 MachineOperatorBuilder::kFloat64RoundTiesAway | |
1705 MachineOperatorBuilder::kWord32Popcnt | | 1713 MachineOperatorBuilder::kWord32Popcnt | |
1706 MachineOperatorBuilder::kWord64Popcnt; | 1714 MachineOperatorBuilder::kWord64Popcnt; |
1707 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. | 1715 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. |
1708 } | 1716 } |
1709 | 1717 |
1710 } // namespace compiler | 1718 } // namespace compiler |
1711 } // namespace internal | 1719 } // namespace internal |
1712 } // namespace v8 | 1720 } // namespace v8 |
OLD | NEW |