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/compiler/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
10 #include "src/compiler/instruction-selector-impl.h" | 10 #include "src/compiler/instruction-selector-impl.h" |
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 case IrOpcode::kCheckedStore: | 1151 case IrOpcode::kCheckedStore: |
1152 return VisitCheckedStore(node); | 1152 return VisitCheckedStore(node); |
1153 case IrOpcode::kInt32PairAdd: | 1153 case IrOpcode::kInt32PairAdd: |
1154 MarkAsWord32(NodeProperties::FindProjection(node, 0)); | 1154 MarkAsWord32(NodeProperties::FindProjection(node, 0)); |
1155 MarkAsWord32(NodeProperties::FindProjection(node, 1)); | 1155 MarkAsWord32(NodeProperties::FindProjection(node, 1)); |
1156 return VisitInt32PairAdd(node); | 1156 return VisitInt32PairAdd(node); |
1157 case IrOpcode::kInt32PairSub: | 1157 case IrOpcode::kInt32PairSub: |
1158 MarkAsWord32(NodeProperties::FindProjection(node, 0)); | 1158 MarkAsWord32(NodeProperties::FindProjection(node, 0)); |
1159 MarkAsWord32(NodeProperties::FindProjection(node, 1)); | 1159 MarkAsWord32(NodeProperties::FindProjection(node, 1)); |
1160 return VisitInt32PairSub(node); | 1160 return VisitInt32PairSub(node); |
| 1161 case IrOpcode::kInt32PairMul: |
| 1162 MarkAsWord32(NodeProperties::FindProjection(node, 0)); |
| 1163 MarkAsWord32(NodeProperties::FindProjection(node, 1)); |
| 1164 return VisitInt32PairMul(node); |
1161 case IrOpcode::kWord32PairShl: | 1165 case IrOpcode::kWord32PairShl: |
1162 MarkAsWord32(NodeProperties::FindProjection(node, 0)); | 1166 MarkAsWord32(NodeProperties::FindProjection(node, 0)); |
1163 MarkAsWord32(NodeProperties::FindProjection(node, 1)); | 1167 MarkAsWord32(NodeProperties::FindProjection(node, 1)); |
1164 return VisitWord32PairShl(node); | 1168 return VisitWord32PairShl(node); |
1165 case IrOpcode::kWord32PairShr: | 1169 case IrOpcode::kWord32PairShr: |
1166 MarkAsWord32(NodeProperties::FindProjection(node, 0)); | 1170 MarkAsWord32(NodeProperties::FindProjection(node, 0)); |
1167 MarkAsWord32(NodeProperties::FindProjection(node, 1)); | 1171 MarkAsWord32(NodeProperties::FindProjection(node, 1)); |
1168 return VisitWord32PairShr(node); | 1172 return VisitWord32PairShr(node); |
1169 case IrOpcode::kWord32PairSar: | 1173 case IrOpcode::kWord32PairSar: |
1170 MarkAsWord32(NodeProperties::FindProjection(node, 0)); | 1174 MarkAsWord32(NodeProperties::FindProjection(node, 0)); |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1392 } | 1396 } |
1393 | 1397 |
1394 #endif // V8_TARGET_ARCH_32_BIT | 1398 #endif // V8_TARGET_ARCH_32_BIT |
1395 | 1399 |
1396 // 64 bit targets do not implement the following instructions. | 1400 // 64 bit targets do not implement the following instructions. |
1397 #if V8_TARGET_ARCH_64_BIT | 1401 #if V8_TARGET_ARCH_64_BIT |
1398 void InstructionSelector::VisitInt32PairAdd(Node* node) { UNIMPLEMENTED(); } | 1402 void InstructionSelector::VisitInt32PairAdd(Node* node) { UNIMPLEMENTED(); } |
1399 | 1403 |
1400 void InstructionSelector::VisitInt32PairSub(Node* node) { UNIMPLEMENTED(); } | 1404 void InstructionSelector::VisitInt32PairSub(Node* node) { UNIMPLEMENTED(); } |
1401 | 1405 |
| 1406 void InstructionSelector::VisitInt32PairMul(Node* node) { UNIMPLEMENTED(); } |
| 1407 |
1402 void InstructionSelector::VisitWord32PairShl(Node* node) { UNIMPLEMENTED(); } | 1408 void InstructionSelector::VisitWord32PairShl(Node* node) { UNIMPLEMENTED(); } |
1403 | 1409 |
1404 void InstructionSelector::VisitWord32PairShr(Node* node) { UNIMPLEMENTED(); } | 1410 void InstructionSelector::VisitWord32PairShr(Node* node) { UNIMPLEMENTED(); } |
1405 | 1411 |
1406 void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); } | 1412 void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); } |
1407 #endif // V8_TARGET_ARCH_64_BIT | 1413 #endif // V8_TARGET_ARCH_64_BIT |
1408 | 1414 |
1409 void InstructionSelector::VisitFinishRegion(Node* node) { | 1415 void InstructionSelector::VisitFinishRegion(Node* node) { |
1410 OperandGenerator g(this); | 1416 OperandGenerator g(this); |
1411 Node* value = node->InputAt(0); | 1417 Node* value = node->InputAt(0); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1478 case IrOpcode::kInt32AddWithOverflow: | 1484 case IrOpcode::kInt32AddWithOverflow: |
1479 case IrOpcode::kInt32SubWithOverflow: | 1485 case IrOpcode::kInt32SubWithOverflow: |
1480 case IrOpcode::kInt64AddWithOverflow: | 1486 case IrOpcode::kInt64AddWithOverflow: |
1481 case IrOpcode::kInt64SubWithOverflow: | 1487 case IrOpcode::kInt64SubWithOverflow: |
1482 case IrOpcode::kTryTruncateFloat32ToInt64: | 1488 case IrOpcode::kTryTruncateFloat32ToInt64: |
1483 case IrOpcode::kTryTruncateFloat64ToInt64: | 1489 case IrOpcode::kTryTruncateFloat64ToInt64: |
1484 case IrOpcode::kTryTruncateFloat32ToUint64: | 1490 case IrOpcode::kTryTruncateFloat32ToUint64: |
1485 case IrOpcode::kTryTruncateFloat64ToUint64: | 1491 case IrOpcode::kTryTruncateFloat64ToUint64: |
1486 case IrOpcode::kInt32PairAdd: | 1492 case IrOpcode::kInt32PairAdd: |
1487 case IrOpcode::kInt32PairSub: | 1493 case IrOpcode::kInt32PairSub: |
| 1494 case IrOpcode::kInt32PairMul: |
1488 case IrOpcode::kWord32PairShl: | 1495 case IrOpcode::kWord32PairShl: |
1489 case IrOpcode::kWord32PairShr: | 1496 case IrOpcode::kWord32PairShr: |
1490 case IrOpcode::kWord32PairSar: | 1497 case IrOpcode::kWord32PairSar: |
1491 if (ProjectionIndexOf(node->op()) == 0u) { | 1498 if (ProjectionIndexOf(node->op()) == 0u) { |
1492 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); | 1499 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); |
1493 } else { | 1500 } else { |
1494 DCHECK(ProjectionIndexOf(node->op()) == 1u); | 1501 DCHECK(ProjectionIndexOf(node->op()) == 1u); |
1495 MarkAsUsed(value); | 1502 MarkAsUsed(value); |
1496 } | 1503 } |
1497 break; | 1504 break; |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1787 return new (instruction_zone()) FrameStateDescriptor( | 1794 return new (instruction_zone()) FrameStateDescriptor( |
1788 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1795 instruction_zone(), state_info.type(), state_info.bailout_id(), |
1789 state_info.state_combine(), parameters, locals, stack, | 1796 state_info.state_combine(), parameters, locals, stack, |
1790 state_info.shared_info(), outer_state); | 1797 state_info.shared_info(), outer_state); |
1791 } | 1798 } |
1792 | 1799 |
1793 | 1800 |
1794 } // namespace compiler | 1801 } // namespace compiler |
1795 } // namespace internal | 1802 } // namespace internal |
1796 } // namespace v8 | 1803 } // namespace v8 |
OLD | NEW |