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/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
6 | 6 |
7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
8 #include "src/base/lazy-instance.h" | 8 #include "src/base/lazy-instance.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/opcodes.h" | 10 #include "src/compiler/opcodes.h" |
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1124 } else if (op->opcode() == IrOpcode::kMerge) { | 1124 } else if (op->opcode() == IrOpcode::kMerge) { |
1125 return Merge(size); | 1125 return Merge(size); |
1126 } else if (op->opcode() == IrOpcode::kLoop) { | 1126 } else if (op->opcode() == IrOpcode::kLoop) { |
1127 return Loop(size); | 1127 return Loop(size); |
1128 } else { | 1128 } else { |
1129 UNREACHABLE(); | 1129 UNREACHABLE(); |
1130 return nullptr; | 1130 return nullptr; |
1131 } | 1131 } |
1132 } | 1132 } |
1133 | 1133 |
1134 const Operator* CommonOperatorBuilder::Int32x4ExtractLane(int32_t value) { | |
titzer
2016/12/05 09:40:08
Can we call this lane_number?
gdeepti
2016/12/06 01:10:08
Done.
| |
1135 return new (zone()) Operator1<int32_t>( // -- | |
titzer
2016/12/05 09:40:08
Can we get a DCHECK that 0 <= lane_number < 4?
gdeepti
2016/12/06 01:10:08
Done.
| |
1136 IrOpcode::kInt32x4ExtractLane, Operator::kPure, // opcode | |
1137 "Int32x4ExtractLane", // name | |
1138 1, 0, 0, 1, 0, 0, // counts | |
1139 value); // parameter | |
1140 } | |
1141 | |
1142 const Operator* CommonOperatorBuilder::Int32x4ReplaceLane(int32_t value) { | |
1143 return new (zone()) Operator1<int32_t>( // -- | |
1144 IrOpcode::kInt32x4ReplaceLane, Operator::kPure, // opcode | |
1145 "Int32x4ReplaceLane", // name | |
1146 2, 0, 0, 1, 0, 0, // counts | |
1147 value); // parameter | |
1148 } | |
1149 | |
1150 const Operator* CommonOperatorBuilder::Float32x4ExtractLane(int32_t value) { | |
1151 return new (zone()) Operator1<int32_t>( // -- | |
1152 IrOpcode::kFloat32x4ExtractLane, Operator::kPure, // opcode | |
1153 "Float32x4ExtractLane", // name | |
1154 1, 0, 0, 1, 0, 0, // counts | |
1155 value); // parameter | |
1156 } | |
1134 | 1157 |
1135 const FrameStateFunctionInfo* | 1158 const FrameStateFunctionInfo* |
1136 CommonOperatorBuilder::CreateFrameStateFunctionInfo( | 1159 CommonOperatorBuilder::CreateFrameStateFunctionInfo( |
1137 FrameStateType type, int parameter_count, int local_count, | 1160 FrameStateType type, int parameter_count, int local_count, |
1138 Handle<SharedFunctionInfo> shared_info) { | 1161 Handle<SharedFunctionInfo> shared_info) { |
1139 return new (zone()->New(sizeof(FrameStateFunctionInfo))) | 1162 return new (zone()->New(sizeof(FrameStateFunctionInfo))) |
1140 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); | 1163 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); |
1141 } | 1164 } |
1142 | 1165 |
1143 } // namespace compiler | 1166 } // namespace compiler |
1144 } // namespace internal | 1167 } // namespace internal |
1145 } // namespace v8 | 1168 } // namespace v8 |
OLD | NEW |