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