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 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 case IrOpcode::kAtomicLoad: { | 1300 case IrOpcode::kAtomicLoad: { |
1301 LoadRepresentation type = LoadRepresentationOf(node->op()); | 1301 LoadRepresentation type = LoadRepresentationOf(node->op()); |
1302 MarkAsRepresentation(type.representation(), node); | 1302 MarkAsRepresentation(type.representation(), node); |
1303 return VisitAtomicLoad(node); | 1303 return VisitAtomicLoad(node); |
1304 } | 1304 } |
1305 case IrOpcode::kAtomicStore: | 1305 case IrOpcode::kAtomicStore: |
1306 return VisitAtomicStore(node); | 1306 return VisitAtomicStore(node); |
1307 case IrOpcode::kUnsafePointerAdd: | 1307 case IrOpcode::kUnsafePointerAdd: |
1308 MarkAsRepresentation(MachineType::PointerRepresentation(), node); | 1308 MarkAsRepresentation(MachineType::PointerRepresentation(), node); |
1309 return VisitUnsafePointerAdd(node); | 1309 return VisitUnsafePointerAdd(node); |
| 1310 case IrOpcode::kCreateInt32x4: |
| 1311 return MarkAsSimd128(node), VisitCreateInt32x4(node); |
| 1312 case IrOpcode::kInt32x4ExtractLane: |
| 1313 return MarkAsWord32(node), VisitInt32x4ExtractLane(node); |
1310 default: | 1314 default: |
1311 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", | 1315 V8_Fatal(__FILE__, __LINE__, "Unexpected operator #%d:%s @ node #%d", |
1312 node->opcode(), node->op()->mnemonic(), node->id()); | 1316 node->opcode(), node->op()->mnemonic(), node->id()); |
1313 break; | 1317 break; |
1314 } | 1318 } |
1315 } | 1319 } |
1316 | 1320 |
1317 void InstructionSelector::VisitImpossibleToWord32(Node* node) { | 1321 void InstructionSelector::VisitImpossibleToWord32(Node* node) { |
1318 OperandGenerator g(this); | 1322 OperandGenerator g(this); |
1319 Emit(kArchImpossible, g.DefineAsConstant(node, Constant(0))); | 1323 Emit(kArchImpossible, g.DefineAsConstant(node, Constant(0))); |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1640 | 1644 |
1641 | 1645 |
1642 void InstructionSelector::VisitBitcastFloat64ToInt64(Node* node) { | 1646 void InstructionSelector::VisitBitcastFloat64ToInt64(Node* node) { |
1643 UNIMPLEMENTED(); | 1647 UNIMPLEMENTED(); |
1644 } | 1648 } |
1645 | 1649 |
1646 | 1650 |
1647 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { | 1651 void InstructionSelector::VisitBitcastInt64ToFloat64(Node* node) { |
1648 UNIMPLEMENTED(); | 1652 UNIMPLEMENTED(); |
1649 } | 1653 } |
1650 | |
1651 #endif // V8_TARGET_ARCH_32_BIT | 1654 #endif // V8_TARGET_ARCH_32_BIT |
1652 | 1655 |
1653 // 64 bit targets do not implement the following instructions. | 1656 // 64 bit targets do not implement the following instructions. |
1654 #if V8_TARGET_ARCH_64_BIT | 1657 #if V8_TARGET_ARCH_64_BIT |
1655 void InstructionSelector::VisitInt32PairAdd(Node* node) { UNIMPLEMENTED(); } | 1658 void InstructionSelector::VisitInt32PairAdd(Node* node) { UNIMPLEMENTED(); } |
1656 | 1659 |
1657 void InstructionSelector::VisitInt32PairSub(Node* node) { UNIMPLEMENTED(); } | 1660 void InstructionSelector::VisitInt32PairSub(Node* node) { UNIMPLEMENTED(); } |
1658 | 1661 |
1659 void InstructionSelector::VisitInt32PairMul(Node* node) { UNIMPLEMENTED(); } | 1662 void InstructionSelector::VisitInt32PairMul(Node* node) { UNIMPLEMENTED(); } |
1660 | 1663 |
1661 void InstructionSelector::VisitWord32PairShl(Node* node) { UNIMPLEMENTED(); } | 1664 void InstructionSelector::VisitWord32PairShl(Node* node) { UNIMPLEMENTED(); } |
1662 | 1665 |
1663 void InstructionSelector::VisitWord32PairShr(Node* node) { UNIMPLEMENTED(); } | 1666 void InstructionSelector::VisitWord32PairShr(Node* node) { UNIMPLEMENTED(); } |
1664 | 1667 |
1665 void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); } | 1668 void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); } |
1666 #endif // V8_TARGET_ARCH_64_BIT | 1669 #endif // V8_TARGET_ARCH_64_BIT |
1667 | 1670 |
| 1671 #if !V8_TARGET_ARCH_X64 |
| 1672 void InstructionSelector::VisitCreateInt32x4(Node* node) { UNIMPLEMENTED(); } |
| 1673 |
| 1674 void InstructionSelector::VisitInt32x4ExtractLane(Node* node) { |
| 1675 UNIMPLEMENTED(); |
| 1676 } |
| 1677 #endif // !V8_TARGET_ARCH_X64 |
| 1678 |
1668 void InstructionSelector::VisitFinishRegion(Node* node) { EmitIdentity(node); } | 1679 void InstructionSelector::VisitFinishRegion(Node* node) { EmitIdentity(node); } |
1669 | 1680 |
1670 void InstructionSelector::VisitParameter(Node* node) { | 1681 void InstructionSelector::VisitParameter(Node* node) { |
1671 OperandGenerator g(this); | 1682 OperandGenerator g(this); |
1672 int index = ParameterIndexOf(node->op()); | 1683 int index = ParameterIndexOf(node->op()); |
1673 InstructionOperand op = | 1684 InstructionOperand op = |
1674 linkage()->ParameterHasSecondaryLocation(index) | 1685 linkage()->ParameterHasSecondaryLocation(index) |
1675 ? g.DefineAsDualLocation( | 1686 ? g.DefineAsDualLocation( |
1676 node, linkage()->GetParameterLocation(index), | 1687 node, linkage()->GetParameterLocation(index), |
1677 linkage()->GetParameterSecondaryLocation(index)) | 1688 linkage()->GetParameterSecondaryLocation(index)) |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2068 return new (instruction_zone()) FrameStateDescriptor( | 2079 return new (instruction_zone()) FrameStateDescriptor( |
2069 instruction_zone(), state_info.type(), state_info.bailout_id(), | 2080 instruction_zone(), state_info.type(), state_info.bailout_id(), |
2070 state_info.state_combine(), parameters, locals, stack, | 2081 state_info.state_combine(), parameters, locals, stack, |
2071 state_info.shared_info(), outer_state); | 2082 state_info.shared_info(), outer_state); |
2072 } | 2083 } |
2073 | 2084 |
2074 | 2085 |
2075 } // namespace compiler | 2086 } // namespace compiler |
2076 } // namespace internal | 2087 } // namespace internal |
2077 } // namespace v8 | 2088 } // namespace v8 |
OLD | NEW |