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

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

Issue 2385393002: [wasm] Implement I32x4ReplaceLane, I32x4Add, I32x4Sub. (Closed)
Patch Set: Add lanes as compile time constants Created 4 years 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/compiler-source-position-table.h" 10 #include "src/compiler/compiler-source-position-table.h"
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 return VisitAtomicStore(node); 1391 return VisitAtomicStore(node);
1392 case IrOpcode::kProtectedLoad: 1392 case IrOpcode::kProtectedLoad:
1393 return VisitProtectedLoad(node); 1393 return VisitProtectedLoad(node);
1394 case IrOpcode::kUnsafePointerAdd: 1394 case IrOpcode::kUnsafePointerAdd:
1395 MarkAsRepresentation(MachineType::PointerRepresentation(), node); 1395 MarkAsRepresentation(MachineType::PointerRepresentation(), node);
1396 return VisitUnsafePointerAdd(node); 1396 return VisitUnsafePointerAdd(node);
1397 case IrOpcode::kCreateInt32x4: 1397 case IrOpcode::kCreateInt32x4:
1398 return MarkAsSimd128(node), VisitCreateInt32x4(node); 1398 return MarkAsSimd128(node), VisitCreateInt32x4(node);
1399 case IrOpcode::kInt32x4ExtractLane: 1399 case IrOpcode::kInt32x4ExtractLane:
1400 return MarkAsWord32(node), VisitInt32x4ExtractLane(node); 1400 return MarkAsWord32(node), VisitInt32x4ExtractLane(node);
1401 case IrOpcode::kInt32x4ReplaceLane:
1402 return MarkAsSimd128(node), VisitInt32x4ReplaceLane(node);
1403 case IrOpcode::kInt32x4Add:
1404 return MarkAsSimd128(node), VisitInt32x4Add(node);
1405 case IrOpcode::kInt32x4Sub:
1406 return MarkAsSimd128(node), VisitInt32x4Sub(node);
1401 default: 1407 default:
1402 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", 1408 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d",
1403 node->opcode(), node->op()->mnemonic(), node->id()); 1409 node->opcode(), node->op()->mnemonic(), node->id());
1404 break; 1410 break;
1405 } 1411 }
1406 } 1412 }
1407 1413
1408 void InstructionSelector::VisitLoadStackPointer(Node* node) { 1414 void InstructionSelector::VisitLoadStackPointer(Node* node) {
1409 OperandGenerator g(this); 1415 OperandGenerator g(this);
1410 Emit(kArchStackPointer, g.DefineAsRegister(node)); 1416 Emit(kArchStackPointer, g.DefineAsRegister(node));
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 1730
1725 void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); } 1731 void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); }
1726 #endif // V8_TARGET_ARCH_64_BIT 1732 #endif // V8_TARGET_ARCH_64_BIT
1727 1733
1728 #if !V8_TARGET_ARCH_X64 1734 #if !V8_TARGET_ARCH_X64
1729 void InstructionSelector::VisitCreateInt32x4(Node* node) { UNIMPLEMENTED(); } 1735 void InstructionSelector::VisitCreateInt32x4(Node* node) { UNIMPLEMENTED(); }
1730 1736
1731 void InstructionSelector::VisitInt32x4ExtractLane(Node* node) { 1737 void InstructionSelector::VisitInt32x4ExtractLane(Node* node) {
1732 UNIMPLEMENTED(); 1738 UNIMPLEMENTED();
1733 } 1739 }
1740
1741 void InstructionSelector::VisitInt32x4ReplaceLane(Node* node) {
1742 UNIMPLEMENTED();
1743 }
1744
1745 void InstructionSelector::VisitInt32x4Add(Node* node) { UNIMPLEMENTED(); }
1746
1747 void InstructionSelector::VisitInt32x4Sub(Node* node) { UNIMPLEMENTED(); }
1734 #endif // !V8_TARGET_ARCH_X64 1748 #endif // !V8_TARGET_ARCH_X64
1735 1749
1736 void InstructionSelector::VisitFinishRegion(Node* node) { EmitIdentity(node); } 1750 void InstructionSelector::VisitFinishRegion(Node* node) { EmitIdentity(node); }
1737 1751
1738 void InstructionSelector::VisitParameter(Node* node) { 1752 void InstructionSelector::VisitParameter(Node* node) {
1739 OperandGenerator g(this); 1753 OperandGenerator g(this);
1740 int index = ParameterIndexOf(node->op()); 1754 int index = ParameterIndexOf(node->op());
1741 InstructionOperand op = 1755 InstructionOperand op =
1742 linkage()->ParameterHasSecondaryLocation(index) 1756 linkage()->ParameterHasSecondaryLocation(index)
1743 ? g.DefineAsDualLocation( 1757 ? g.DefineAsDualLocation(
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
2112 return new (instruction_zone()) FrameStateDescriptor( 2126 return new (instruction_zone()) FrameStateDescriptor(
2113 instruction_zone(), state_info.type(), state_info.bailout_id(), 2127 instruction_zone(), state_info.type(), state_info.bailout_id(),
2114 state_info.state_combine(), parameters, locals, stack, 2128 state_info.state_combine(), parameters, locals, stack,
2115 state_info.shared_info(), outer_state); 2129 state_info.shared_info(), outer_state);
2116 } 2130 }
2117 2131
2118 2132
2119 } // namespace compiler 2133 } // namespace compiler
2120 } // namespace internal 2134 } // namespace internal
2121 } // namespace v8 2135 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698