| 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::kWord32PairShl: |
| 1154 MarkAsWord32(NodeProperties::FindProjection(node, 0)); |
| 1155 MarkAsWord32(NodeProperties::FindProjection(node, 1)); |
| 1156 return VisitWord32PairShl(node); |
| 1153 default: | 1157 default: |
| 1154 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", | 1158 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", |
| 1155 node->opcode(), node->op()->mnemonic(), node->id()); | 1159 node->opcode(), node->op()->mnemonic(), node->id()); |
| 1156 break; | 1160 break; |
| 1157 } | 1161 } |
| 1158 } | 1162 } |
| 1159 | 1163 |
| 1160 | 1164 |
| 1161 void InstructionSelector::VisitLoadStackPointer(Node* node) { | 1165 void InstructionSelector::VisitLoadStackPointer(Node* node) { |
| 1162 OperandGenerator g(this); | 1166 OperandGenerator g(this); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1366 UNIMPLEMENTED(); | 1370 UNIMPLEMENTED(); |
| 1367 } | 1371 } |
| 1368 | 1372 |
| 1369 | 1373 |
| 1370 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { | 1374 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { |
| 1371 UNIMPLEMENTED(); | 1375 UNIMPLEMENTED(); |
| 1372 } | 1376 } |
| 1373 | 1377 |
| 1374 #endif // V8_TARGET_ARCH_32_BIT | 1378 #endif // V8_TARGET_ARCH_32_BIT |
| 1375 | 1379 |
| 1380 // 32 bit targets do not implement the following instructions. |
| 1381 #if V8_TARGET_ARCH_64_BIT |
| 1382 void InstructionSelector::VisitWord32PairShl(Node* node) { UNIMPLEMENTED(); } |
| 1383 #endif // V8_TARGET_ARCH_64_BIT |
| 1376 | 1384 |
| 1377 void InstructionSelector::VisitFinishRegion(Node* node) { | 1385 void InstructionSelector::VisitFinishRegion(Node* node) { |
| 1378 OperandGenerator g(this); | 1386 OperandGenerator g(this); |
| 1379 Node* value = node->InputAt(0); | 1387 Node* value = node->InputAt(0); |
| 1380 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); | 1388 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); |
| 1381 } | 1389 } |
| 1382 | 1390 |
| 1383 | 1391 |
| 1384 void InstructionSelector::VisitGuard(Node* node) { | 1392 void InstructionSelector::VisitGuard(Node* node) { |
| 1385 OperandGenerator g(this); | 1393 OperandGenerator g(this); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 Node* value = node->InputAt(0); | 1452 Node* value = node->InputAt(0); |
| 1445 switch (value->opcode()) { | 1453 switch (value->opcode()) { |
| 1446 case IrOpcode::kInt32AddWithOverflow: | 1454 case IrOpcode::kInt32AddWithOverflow: |
| 1447 case IrOpcode::kInt32SubWithOverflow: | 1455 case IrOpcode::kInt32SubWithOverflow: |
| 1448 case IrOpcode::kInt64AddWithOverflow: | 1456 case IrOpcode::kInt64AddWithOverflow: |
| 1449 case IrOpcode::kInt64SubWithOverflow: | 1457 case IrOpcode::kInt64SubWithOverflow: |
| 1450 case IrOpcode::kTryTruncateFloat32ToInt64: | 1458 case IrOpcode::kTryTruncateFloat32ToInt64: |
| 1451 case IrOpcode::kTryTruncateFloat64ToInt64: | 1459 case IrOpcode::kTryTruncateFloat64ToInt64: |
| 1452 case IrOpcode::kTryTruncateFloat32ToUint64: | 1460 case IrOpcode::kTryTruncateFloat32ToUint64: |
| 1453 case IrOpcode::kTryTruncateFloat64ToUint64: | 1461 case IrOpcode::kTryTruncateFloat64ToUint64: |
| 1462 case IrOpcode::kWord32PairShl: |
| 1454 if (ProjectionIndexOf(node->op()) == 0u) { | 1463 if (ProjectionIndexOf(node->op()) == 0u) { |
| 1455 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); | 1464 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); |
| 1456 } else { | 1465 } else { |
| 1457 DCHECK(ProjectionIndexOf(node->op()) == 1u); | 1466 DCHECK(ProjectionIndexOf(node->op()) == 1u); |
| 1458 MarkAsUsed(value); | 1467 MarkAsUsed(value); |
| 1459 } | 1468 } |
| 1460 break; | 1469 break; |
| 1461 default: | 1470 default: |
| 1462 break; | 1471 break; |
| 1463 } | 1472 } |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1728 return new (instruction_zone()) FrameStateDescriptor( | 1737 return new (instruction_zone()) FrameStateDescriptor( |
| 1729 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1738 instruction_zone(), state_info.type(), state_info.bailout_id(), |
| 1730 state_info.state_combine(), parameters, locals, stack, | 1739 state_info.state_combine(), parameters, locals, stack, |
| 1731 state_info.shared_info(), outer_state); | 1740 state_info.shared_info(), outer_state); |
| 1732 } | 1741 } |
| 1733 | 1742 |
| 1734 | 1743 |
| 1735 } // namespace compiler | 1744 } // namespace compiler |
| 1736 } // namespace internal | 1745 } // namespace internal |
| 1737 } // namespace v8 | 1746 } // namespace v8 |
| OLD | NEW |