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 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 case IrOpcode::kLoadParentFramePointer: | 1143 case IrOpcode::kLoadParentFramePointer: |
1144 return VisitLoadParentFramePointer(node); | 1144 return VisitLoadParentFramePointer(node); |
1145 case IrOpcode::kCheckedLoad: { | 1145 case IrOpcode::kCheckedLoad: { |
1146 MachineRepresentation rep = | 1146 MachineRepresentation rep = |
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::kInt32AddPair: |
| 1154 MarkAsWord32(NodeProperties::FindProjection(node, 0)); |
| 1155 MarkAsWord32(NodeProperties::FindProjection(node, 1)); |
| 1156 return VisitInt32AddPair(node); |
1153 case IrOpcode::kWord32PairShl: | 1157 case IrOpcode::kWord32PairShl: |
1154 MarkAsWord32(NodeProperties::FindProjection(node, 0)); | 1158 MarkAsWord32(NodeProperties::FindProjection(node, 0)); |
1155 MarkAsWord32(NodeProperties::FindProjection(node, 1)); | 1159 MarkAsWord32(NodeProperties::FindProjection(node, 1)); |
1156 return VisitWord32PairShl(node); | 1160 return VisitWord32PairShl(node); |
1157 default: | 1161 default: |
1158 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", | 1162 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", |
1159 node->opcode(), node->op()->mnemonic(), node->id()); | 1163 node->opcode(), node->op()->mnemonic(), node->id()); |
1160 break; | 1164 break; |
1161 } | 1165 } |
1162 } | 1166 } |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1372 | 1376 |
1373 | 1377 |
1374 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { | 1378 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { |
1375 UNIMPLEMENTED(); | 1379 UNIMPLEMENTED(); |
1376 } | 1380 } |
1377 | 1381 |
1378 #endif // V8_TARGET_ARCH_32_BIT | 1382 #endif // V8_TARGET_ARCH_32_BIT |
1379 | 1383 |
1380 // 32 bit targets do not implement the following instructions. | 1384 // 32 bit targets do not implement the following instructions. |
1381 #if V8_TARGET_ARCH_64_BIT | 1385 #if V8_TARGET_ARCH_64_BIT |
| 1386 void InstructionSelector::VisitInt32AddPair(Node* node) { UNIMPLEMENTED(); } |
| 1387 |
1382 void InstructionSelector::VisitWord32PairShl(Node* node) { UNIMPLEMENTED(); } | 1388 void InstructionSelector::VisitWord32PairShl(Node* node) { UNIMPLEMENTED(); } |
1383 #endif // V8_TARGET_ARCH_64_BIT | 1389 #endif // V8_TARGET_ARCH_64_BIT |
1384 | 1390 |
1385 void InstructionSelector::VisitFinishRegion(Node* node) { | 1391 void InstructionSelector::VisitFinishRegion(Node* node) { |
1386 OperandGenerator g(this); | 1392 OperandGenerator g(this); |
1387 Node* value = node->InputAt(0); | 1393 Node* value = node->InputAt(0); |
1388 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); | 1394 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); |
1389 } | 1395 } |
1390 | 1396 |
1391 | 1397 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1452 Node* value = node->InputAt(0); | 1458 Node* value = node->InputAt(0); |
1453 switch (value->opcode()) { | 1459 switch (value->opcode()) { |
1454 case IrOpcode::kInt32AddWithOverflow: | 1460 case IrOpcode::kInt32AddWithOverflow: |
1455 case IrOpcode::kInt32SubWithOverflow: | 1461 case IrOpcode::kInt32SubWithOverflow: |
1456 case IrOpcode::kInt64AddWithOverflow: | 1462 case IrOpcode::kInt64AddWithOverflow: |
1457 case IrOpcode::kInt64SubWithOverflow: | 1463 case IrOpcode::kInt64SubWithOverflow: |
1458 case IrOpcode::kTryTruncateFloat32ToInt64: | 1464 case IrOpcode::kTryTruncateFloat32ToInt64: |
1459 case IrOpcode::kTryTruncateFloat64ToInt64: | 1465 case IrOpcode::kTryTruncateFloat64ToInt64: |
1460 case IrOpcode::kTryTruncateFloat32ToUint64: | 1466 case IrOpcode::kTryTruncateFloat32ToUint64: |
1461 case IrOpcode::kTryTruncateFloat64ToUint64: | 1467 case IrOpcode::kTryTruncateFloat64ToUint64: |
| 1468 case IrOpcode::kInt32AddPair: |
1462 case IrOpcode::kWord32PairShl: | 1469 case IrOpcode::kWord32PairShl: |
1463 if (ProjectionIndexOf(node->op()) == 0u) { | 1470 if (ProjectionIndexOf(node->op()) == 0u) { |
1464 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); | 1471 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); |
1465 } else { | 1472 } else { |
1466 DCHECK(ProjectionIndexOf(node->op()) == 1u); | 1473 DCHECK(ProjectionIndexOf(node->op()) == 1u); |
1467 MarkAsUsed(value); | 1474 MarkAsUsed(value); |
1468 } | 1475 } |
1469 break; | 1476 break; |
1470 default: | 1477 default: |
1471 break; | 1478 break; |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1757 return new (instruction_zone()) FrameStateDescriptor( | 1764 return new (instruction_zone()) FrameStateDescriptor( |
1758 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1765 instruction_zone(), state_info.type(), state_info.bailout_id(), |
1759 state_info.state_combine(), parameters, locals, stack, | 1766 state_info.state_combine(), parameters, locals, stack, |
1760 state_info.shared_info(), outer_state); | 1767 state_info.shared_info(), outer_state); |
1761 } | 1768 } |
1762 | 1769 |
1763 | 1770 |
1764 } // namespace compiler | 1771 } // namespace compiler |
1765 } // namespace internal | 1772 } // namespace internal |
1766 } // namespace v8 | 1773 } // namespace v8 |
OLD | NEW |