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 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 switch (TruncationModeOf(node->op())) { | 1008 switch (TruncationModeOf(node->op())) { |
1009 case TruncationMode::kJavaScript: | 1009 case TruncationMode::kJavaScript: |
1010 return VisitRR(this, kArchTruncateDoubleToI, node); | 1010 return VisitRR(this, kArchTruncateDoubleToI, node); |
1011 case TruncationMode::kRoundToZero: | 1011 case TruncationMode::kRoundToZero: |
1012 return VisitRR(this, kPPC_DoubleToInt32, node); | 1012 return VisitRR(this, kPPC_DoubleToInt32, node); |
1013 } | 1013 } |
1014 UNREACHABLE(); | 1014 UNREACHABLE(); |
1015 } | 1015 } |
1016 | 1016 |
1017 | 1017 |
| 1018 void InstructionSelector::VisitTruncateFloat32ToInt32(Node* node) { |
| 1019 return VisitRR(this, kPPC_DoubleToInt32, node); |
| 1020 } |
| 1021 |
| 1022 |
1018 #if V8_TARGET_ARCH_PPC64 | 1023 #if V8_TARGET_ARCH_PPC64 |
1019 void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) { | 1024 void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) { |
1020 // TODO(mbrandy): inspect input to see if nop is appropriate. | 1025 // TODO(mbrandy): inspect input to see if nop is appropriate. |
1021 VisitRR(this, kPPC_Int64ToInt32, node); | 1026 VisitRR(this, kPPC_Int64ToInt32, node); |
1022 } | 1027 } |
1023 | 1028 |
1024 | 1029 |
1025 void InstructionSelector::VisitRoundInt64ToFloat32(Node* node) { | 1030 void InstructionSelector::VisitRoundInt64ToFloat32(Node* node) { |
1026 VisitRR(this, kPPC_Int64ToFloat32, node); | 1031 VisitRR(this, kPPC_Int64ToFloat32, node); |
1027 } | 1032 } |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1768 MachineOperatorBuilder::kFloat64RoundTruncate | | 1773 MachineOperatorBuilder::kFloat64RoundTruncate | |
1769 MachineOperatorBuilder::kFloat64RoundTiesAway | | 1774 MachineOperatorBuilder::kFloat64RoundTiesAway | |
1770 MachineOperatorBuilder::kWord32Popcnt | | 1775 MachineOperatorBuilder::kWord32Popcnt | |
1771 MachineOperatorBuilder::kWord64Popcnt; | 1776 MachineOperatorBuilder::kWord64Popcnt; |
1772 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. | 1777 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. |
1773 } | 1778 } |
1774 | 1779 |
1775 } // namespace compiler | 1780 } // namespace compiler |
1776 } // namespace internal | 1781 } // namespace internal |
1777 } // namespace v8 | 1782 } // namespace v8 |
OLD | NEW |