Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 1778493004: [wasm] Int64Lowering of Int64Add on ia32 and arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed nits. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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::kInt32PairAdd:
1154 MarkAsWord32(NodeProperties::FindProjection(node, 0));
1155 MarkAsWord32(NodeProperties::FindProjection(node, 1));
1156 return VisitInt32PairAdd(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 case IrOpcode::kWord32PairShr: 1161 case IrOpcode::kWord32PairShr:
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 VisitWord32PairShr(node); 1164 return VisitWord32PairShr(node);
1161 case IrOpcode::kWord32PairSar: 1165 case IrOpcode::kWord32PairSar:
1162 MarkAsWord32(NodeProperties::FindProjection(node, 0)); 1166 MarkAsWord32(NodeProperties::FindProjection(node, 0));
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 1384
1381 1385
1382 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { 1386 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) {
1383 UNIMPLEMENTED(); 1387 UNIMPLEMENTED();
1384 } 1388 }
1385 1389
1386 #endif // V8_TARGET_ARCH_32_BIT 1390 #endif // V8_TARGET_ARCH_32_BIT
1387 1391
1388 // 32 bit targets do not implement the following instructions. 1392 // 32 bit targets do not implement the following instructions.
1389 #if V8_TARGET_ARCH_64_BIT 1393 #if V8_TARGET_ARCH_64_BIT
1394 void InstructionSelector::VisitInt32PairAdd(Node* node) { UNIMPLEMENTED(); }
1395
1390 void InstructionSelector::VisitWord32PairShl(Node* node) { UNIMPLEMENTED(); } 1396 void InstructionSelector::VisitWord32PairShl(Node* node) { UNIMPLEMENTED(); }
1391 1397
1392 void InstructionSelector::VisitWord32PairShr(Node* node) { UNIMPLEMENTED(); } 1398 void InstructionSelector::VisitWord32PairShr(Node* node) { UNIMPLEMENTED(); }
1393 1399
1394 void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); } 1400 void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); }
1395 #endif // V8_TARGET_ARCH_64_BIT 1401 #endif // V8_TARGET_ARCH_64_BIT
1396 1402
1397 void InstructionSelector::VisitFinishRegion(Node* node) { 1403 void InstructionSelector::VisitFinishRegion(Node* node) {
1398 OperandGenerator g(this); 1404 OperandGenerator g(this);
1399 Node* value = node->InputAt(0); 1405 Node* value = node->InputAt(0);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 Node* value = node->InputAt(0); 1470 Node* value = node->InputAt(0);
1465 switch (value->opcode()) { 1471 switch (value->opcode()) {
1466 case IrOpcode::kInt32AddWithOverflow: 1472 case IrOpcode::kInt32AddWithOverflow:
1467 case IrOpcode::kInt32SubWithOverflow: 1473 case IrOpcode::kInt32SubWithOverflow:
1468 case IrOpcode::kInt64AddWithOverflow: 1474 case IrOpcode::kInt64AddWithOverflow:
1469 case IrOpcode::kInt64SubWithOverflow: 1475 case IrOpcode::kInt64SubWithOverflow:
1470 case IrOpcode::kTryTruncateFloat32ToInt64: 1476 case IrOpcode::kTryTruncateFloat32ToInt64:
1471 case IrOpcode::kTryTruncateFloat64ToInt64: 1477 case IrOpcode::kTryTruncateFloat64ToInt64:
1472 case IrOpcode::kTryTruncateFloat32ToUint64: 1478 case IrOpcode::kTryTruncateFloat32ToUint64:
1473 case IrOpcode::kTryTruncateFloat64ToUint64: 1479 case IrOpcode::kTryTruncateFloat64ToUint64:
1480 case IrOpcode::kInt32PairAdd:
1474 case IrOpcode::kWord32PairShl: 1481 case IrOpcode::kWord32PairShl:
1475 case IrOpcode::kWord32PairShr: 1482 case IrOpcode::kWord32PairShr:
1476 case IrOpcode::kWord32PairSar: 1483 case IrOpcode::kWord32PairSar:
1477 if (ProjectionIndexOf(node->op()) == 0u) { 1484 if (ProjectionIndexOf(node->op()) == 0u) {
1478 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); 1485 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value));
1479 } else { 1486 } else {
1480 DCHECK(ProjectionIndexOf(node->op()) == 1u); 1487 DCHECK(ProjectionIndexOf(node->op()) == 1u);
1481 MarkAsUsed(value); 1488 MarkAsUsed(value);
1482 } 1489 }
1483 break; 1490 break;
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 return new (instruction_zone()) FrameStateDescriptor( 1778 return new (instruction_zone()) FrameStateDescriptor(
1772 instruction_zone(), state_info.type(), state_info.bailout_id(), 1779 instruction_zone(), state_info.type(), state_info.bailout_id(),
1773 state_info.state_combine(), parameters, locals, stack, 1780 state_info.state_combine(), parameters, locals, stack,
1774 state_info.shared_info(), outer_state); 1781 state_info.shared_info(), outer_state);
1775 } 1782 }
1776 1783
1777 1784
1778 } // namespace compiler 1785 } // namespace compiler
1779 } // namespace internal 1786 } // namespace internal
1780 } // namespace v8 1787 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698