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 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1140 case IrOpcode::kLoadParentFramePointer: | 1140 case IrOpcode::kLoadParentFramePointer: |
1141 return VisitLoadParentFramePointer(node); | 1141 return VisitLoadParentFramePointer(node); |
1142 case IrOpcode::kCheckedLoad: { | 1142 case IrOpcode::kCheckedLoad: { |
1143 MachineRepresentation rep = | 1143 MachineRepresentation rep = |
1144 CheckedLoadRepresentationOf(node->op()).representation(); | 1144 CheckedLoadRepresentationOf(node->op()).representation(); |
1145 MarkAsRepresentation(rep, node); | 1145 MarkAsRepresentation(rep, node); |
1146 return VisitCheckedLoad(node); | 1146 return VisitCheckedLoad(node); |
1147 } | 1147 } |
1148 case IrOpcode::kCheckedStore: | 1148 case IrOpcode::kCheckedStore: |
1149 return VisitCheckedStore(node); | 1149 return VisitCheckedStore(node); |
1150 case IrOpcode::kWasmWord64Shl: | |
1151 return MarkAsWord32(node), VisitWasmWord64Shl(node); | |
titzer
2016/03/02 22:32:53
I don't think you want to do MarkAsWord32 here; yo
ahaas
2016/03/04 10:21:11
Done. PTAL here, I'm not sure I understood you cor
| |
1150 default: | 1152 default: |
1151 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", | 1153 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", |
1152 node->opcode(), node->op()->mnemonic(), node->id()); | 1154 node->opcode(), node->op()->mnemonic(), node->id()); |
1153 break; | 1155 break; |
1154 } | 1156 } |
1155 } | 1157 } |
1156 | 1158 |
1157 | 1159 |
1158 void InstructionSelector::VisitLoadStackPointer(Node* node) { | 1160 void InstructionSelector::VisitLoadStackPointer(Node* node) { |
1159 OperandGenerator g(this); | 1161 OperandGenerator g(this); |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1363 UNIMPLEMENTED(); | 1365 UNIMPLEMENTED(); |
1364 } | 1366 } |
1365 | 1367 |
1366 | 1368 |
1367 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { | 1369 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { |
1368 UNIMPLEMENTED(); | 1370 UNIMPLEMENTED(); |
1369 } | 1371 } |
1370 | 1372 |
1371 #endif // V8_TARGET_ARCH_32_BIT | 1373 #endif // V8_TARGET_ARCH_32_BIT |
1372 | 1374 |
1375 // 32 bit targets do not implement the following instructions. | |
1376 #if V8_TARGET_ARCH_64_BIT | |
1377 void InstructionSelector::VisitWasmWord64Shl(Node* node) { UNIMPLEMENTED(); } | |
1378 #endif // V8_TARGET_ARCH_64_BIT | |
1373 | 1379 |
1374 void InstructionSelector::VisitFinishRegion(Node* node) { | 1380 void InstructionSelector::VisitFinishRegion(Node* node) { |
1375 OperandGenerator g(this); | 1381 OperandGenerator g(this); |
1376 Node* value = node->InputAt(0); | 1382 Node* value = node->InputAt(0); |
1377 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); | 1383 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); |
1378 } | 1384 } |
1379 | 1385 |
1380 | 1386 |
1381 void InstructionSelector::VisitGuard(Node* node) { | 1387 void InstructionSelector::VisitGuard(Node* node) { |
1382 OperandGenerator g(this); | 1388 OperandGenerator g(this); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1441 Node* value = node->InputAt(0); | 1447 Node* value = node->InputAt(0); |
1442 switch (value->opcode()) { | 1448 switch (value->opcode()) { |
1443 case IrOpcode::kInt32AddWithOverflow: | 1449 case IrOpcode::kInt32AddWithOverflow: |
1444 case IrOpcode::kInt32SubWithOverflow: | 1450 case IrOpcode::kInt32SubWithOverflow: |
1445 case IrOpcode::kInt64AddWithOverflow: | 1451 case IrOpcode::kInt64AddWithOverflow: |
1446 case IrOpcode::kInt64SubWithOverflow: | 1452 case IrOpcode::kInt64SubWithOverflow: |
1447 case IrOpcode::kTryTruncateFloat32ToInt64: | 1453 case IrOpcode::kTryTruncateFloat32ToInt64: |
1448 case IrOpcode::kTryTruncateFloat64ToInt64: | 1454 case IrOpcode::kTryTruncateFloat64ToInt64: |
1449 case IrOpcode::kTryTruncateFloat32ToUint64: | 1455 case IrOpcode::kTryTruncateFloat32ToUint64: |
1450 case IrOpcode::kTryTruncateFloat64ToUint64: | 1456 case IrOpcode::kTryTruncateFloat64ToUint64: |
1457 case IrOpcode::kWasmWord64Shl: | |
1451 if (ProjectionIndexOf(node->op()) == 0u) { | 1458 if (ProjectionIndexOf(node->op()) == 0u) { |
1452 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); | 1459 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); |
1453 } else { | 1460 } else { |
1454 DCHECK(ProjectionIndexOf(node->op()) == 1u); | 1461 DCHECK(ProjectionIndexOf(node->op()) == 1u); |
1455 MarkAsUsed(value); | 1462 MarkAsUsed(value); |
1456 } | 1463 } |
1457 break; | 1464 break; |
1458 default: | 1465 default: |
1459 break; | 1466 break; |
1460 } | 1467 } |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1725 return new (instruction_zone()) FrameStateDescriptor( | 1732 return new (instruction_zone()) FrameStateDescriptor( |
1726 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1733 instruction_zone(), state_info.type(), state_info.bailout_id(), |
1727 state_info.state_combine(), parameters, locals, stack, | 1734 state_info.state_combine(), parameters, locals, stack, |
1728 state_info.shared_info(), outer_state); | 1735 state_info.shared_info(), outer_state); |
1729 } | 1736 } |
1730 | 1737 |
1731 | 1738 |
1732 } // namespace compiler | 1739 } // namespace compiler |
1733 } // namespace internal | 1740 } // namespace internal |
1734 } // namespace v8 | 1741 } // namespace v8 |
OLD | NEW |