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 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 CheckedLoadRepresentationOf(node->op()).representation(); | 1147 CheckedLoadRepresentationOf(node->op()).representation(); |
1148 MarkAsRepresentation(rep, node); | 1148 MarkAsRepresentation(rep, node); |
1149 return VisitCheckedLoad(node); | 1149 return VisitCheckedLoad(node); |
1150 } | 1150 } |
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: |
| 1158 MarkAsWord32(NodeProperties::FindProjection(node, 0)); |
| 1159 MarkAsWord32(NodeProperties::FindProjection(node, 1)); |
| 1160 return VisitInt32PairSub(node); |
1157 case IrOpcode::kWord32PairShl: | 1161 case IrOpcode::kWord32PairShl: |
1158 MarkAsWord32(NodeProperties::FindProjection(node, 0)); | 1162 MarkAsWord32(NodeProperties::FindProjection(node, 0)); |
1159 MarkAsWord32(NodeProperties::FindProjection(node, 1)); | 1163 MarkAsWord32(NodeProperties::FindProjection(node, 1)); |
1160 return VisitWord32PairShl(node); | 1164 return VisitWord32PairShl(node); |
1161 case IrOpcode::kWord32PairShr: | 1165 case IrOpcode::kWord32PairShr: |
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 VisitWord32PairShr(node); | 1168 return VisitWord32PairShr(node); |
1165 case IrOpcode::kWord32PairSar: | 1169 case IrOpcode::kWord32PairSar: |
1166 MarkAsWord32(NodeProperties::FindProjection(node, 0)); | 1170 MarkAsWord32(NodeProperties::FindProjection(node, 0)); |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1382 UNIMPLEMENTED(); | 1386 UNIMPLEMENTED(); |
1383 } | 1387 } |
1384 | 1388 |
1385 | 1389 |
1386 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { | 1390 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { |
1387 UNIMPLEMENTED(); | 1391 UNIMPLEMENTED(); |
1388 } | 1392 } |
1389 | 1393 |
1390 #endif // V8_TARGET_ARCH_32_BIT | 1394 #endif // V8_TARGET_ARCH_32_BIT |
1391 | 1395 |
1392 // 32 bit targets do not implement the following instructions. | 1396 // 64 bit targets do not implement the following instructions. |
1393 #if V8_TARGET_ARCH_64_BIT | 1397 #if V8_TARGET_ARCH_64_BIT |
1394 void InstructionSelector::VisitInt32PairAdd(Node* node) { UNIMPLEMENTED(); } | 1398 void InstructionSelector::VisitInt32PairAdd(Node* node) { UNIMPLEMENTED(); } |
1395 | 1399 |
| 1400 void InstructionSelector::VisitInt32PairSub(Node* node) { UNIMPLEMENTED(); } |
| 1401 |
1396 void InstructionSelector::VisitWord32PairShl(Node* node) { UNIMPLEMENTED(); } | 1402 void InstructionSelector::VisitWord32PairShl(Node* node) { UNIMPLEMENTED(); } |
1397 | 1403 |
1398 void InstructionSelector::VisitWord32PairShr(Node* node) { UNIMPLEMENTED(); } | 1404 void InstructionSelector::VisitWord32PairShr(Node* node) { UNIMPLEMENTED(); } |
1399 | 1405 |
1400 void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); } | 1406 void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); } |
1401 #endif // V8_TARGET_ARCH_64_BIT | 1407 #endif // V8_TARGET_ARCH_64_BIT |
1402 | 1408 |
1403 void InstructionSelector::VisitFinishRegion(Node* node) { | 1409 void InstructionSelector::VisitFinishRegion(Node* node) { |
1404 OperandGenerator g(this); | 1410 OperandGenerator g(this); |
1405 Node* value = node->InputAt(0); | 1411 Node* value = node->InputAt(0); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1471 switch (value->opcode()) { | 1477 switch (value->opcode()) { |
1472 case IrOpcode::kInt32AddWithOverflow: | 1478 case IrOpcode::kInt32AddWithOverflow: |
1473 case IrOpcode::kInt32SubWithOverflow: | 1479 case IrOpcode::kInt32SubWithOverflow: |
1474 case IrOpcode::kInt64AddWithOverflow: | 1480 case IrOpcode::kInt64AddWithOverflow: |
1475 case IrOpcode::kInt64SubWithOverflow: | 1481 case IrOpcode::kInt64SubWithOverflow: |
1476 case IrOpcode::kTryTruncateFloat32ToInt64: | 1482 case IrOpcode::kTryTruncateFloat32ToInt64: |
1477 case IrOpcode::kTryTruncateFloat64ToInt64: | 1483 case IrOpcode::kTryTruncateFloat64ToInt64: |
1478 case IrOpcode::kTryTruncateFloat32ToUint64: | 1484 case IrOpcode::kTryTruncateFloat32ToUint64: |
1479 case IrOpcode::kTryTruncateFloat64ToUint64: | 1485 case IrOpcode::kTryTruncateFloat64ToUint64: |
1480 case IrOpcode::kInt32PairAdd: | 1486 case IrOpcode::kInt32PairAdd: |
| 1487 case IrOpcode::kInt32PairSub: |
1481 case IrOpcode::kWord32PairShl: | 1488 case IrOpcode::kWord32PairShl: |
1482 case IrOpcode::kWord32PairShr: | 1489 case IrOpcode::kWord32PairShr: |
1483 case IrOpcode::kWord32PairSar: | 1490 case IrOpcode::kWord32PairSar: |
1484 if (ProjectionIndexOf(node->op()) == 0u) { | 1491 if (ProjectionIndexOf(node->op()) == 0u) { |
1485 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); | 1492 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); |
1486 } else { | 1493 } else { |
1487 DCHECK(ProjectionIndexOf(node->op()) == 1u); | 1494 DCHECK(ProjectionIndexOf(node->op()) == 1u); |
1488 MarkAsUsed(value); | 1495 MarkAsUsed(value); |
1489 } | 1496 } |
1490 break; | 1497 break; |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1778 return new (instruction_zone()) FrameStateDescriptor( | 1785 return new (instruction_zone()) FrameStateDescriptor( |
1779 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1786 instruction_zone(), state_info.type(), state_info.bailout_id(), |
1780 state_info.state_combine(), parameters, locals, stack, | 1787 state_info.state_combine(), parameters, locals, stack, |
1781 state_info.shared_info(), outer_state); | 1788 state_info.shared_info(), outer_state); |
1782 } | 1789 } |
1783 | 1790 |
1784 | 1791 |
1785 } // namespace compiler | 1792 } // namespace compiler |
1786 } // namespace internal | 1793 } // namespace internal |
1787 } // namespace v8 | 1794 } // namespace v8 |
OLD | NEW |