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