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

Side by Side Diff: src/compiler/machine-operator.cc

Issue 1848433003: Turbofan: Add MachineOperators for SIMD. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 7 months 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
« no previous file with comments | « src/compiler/machine-operator.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/machine-operator.h" 5 #include "src/compiler/machine-operator.h"
6 6
7 #include "src/base/lazy-instance.h" 7 #include "src/base/lazy-instance.h"
8 #include "src/compiler/opcodes.h" 8 #include "src/compiler/opcodes.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 10
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 V(Float64InsertLowWord32, Operator::kNoProperties, 2, 0, 1) \ 181 V(Float64InsertLowWord32, Operator::kNoProperties, 2, 0, 1) \
182 V(Float64InsertHighWord32, Operator::kNoProperties, 2, 0, 1) \ 182 V(Float64InsertHighWord32, Operator::kNoProperties, 2, 0, 1) \
183 V(LoadStackPointer, Operator::kNoProperties, 0, 0, 1) \ 183 V(LoadStackPointer, Operator::kNoProperties, 0, 0, 1) \
184 V(LoadFramePointer, Operator::kNoProperties, 0, 0, 1) \ 184 V(LoadFramePointer, Operator::kNoProperties, 0, 0, 1) \
185 V(LoadParentFramePointer, Operator::kNoProperties, 0, 0, 1) \ 185 V(LoadParentFramePointer, Operator::kNoProperties, 0, 0, 1) \
186 V(Int32PairAdd, Operator::kNoProperties, 4, 0, 2) \ 186 V(Int32PairAdd, Operator::kNoProperties, 4, 0, 2) \
187 V(Int32PairSub, Operator::kNoProperties, 4, 0, 2) \ 187 V(Int32PairSub, Operator::kNoProperties, 4, 0, 2) \
188 V(Int32PairMul, Operator::kNoProperties, 4, 0, 2) \ 188 V(Int32PairMul, Operator::kNoProperties, 4, 0, 2) \
189 V(Word32PairShl, Operator::kNoProperties, 3, 0, 2) \ 189 V(Word32PairShl, Operator::kNoProperties, 3, 0, 2) \
190 V(Word32PairShr, Operator::kNoProperties, 3, 0, 2) \ 190 V(Word32PairShr, Operator::kNoProperties, 3, 0, 2) \
191 V(Word32PairSar, Operator::kNoProperties, 3, 0, 2) 191 V(Word32PairSar, Operator::kNoProperties, 3, 0, 2) \
192 V(CreateFloat32x4, Operator::kNoProperties, 4, 0, 1) \
193 V(Float32x4ExtractLane, Operator::kNoProperties, 2, 0, 1) \
194 V(Float32x4ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
195 V(Float32x4Abs, Operator::kNoProperties, 1, 0, 1) \
196 V(Float32x4Neg, Operator::kNoProperties, 1, 0, 1) \
197 V(Float32x4Sqrt, Operator::kNoProperties, 1, 0, 1) \
198 V(Float32x4RecipApprox, Operator::kNoProperties, 1, 0, 1) \
199 V(Float32x4RecipSqrtApprox, Operator::kNoProperties, 1, 0, 1) \
200 V(Float32x4Add, Operator::kCommutative, 2, 0, 1) \
201 V(Float32x4Sub, Operator::kNoProperties, 2, 0, 1) \
202 V(Float32x4Mul, Operator::kCommutative, 2, 0, 1) \
203 V(Float32x4Div, Operator::kNoProperties, 2, 0, 1) \
204 V(Float32x4Min, Operator::kCommutative, 2, 0, 1) \
205 V(Float32x4Max, Operator::kCommutative, 2, 0, 1) \
206 V(Float32x4MinNum, Operator::kCommutative, 2, 0, 1) \
207 V(Float32x4MaxNum, Operator::kCommutative, 2, 0, 1) \
208 V(Float32x4Equal, Operator::kCommutative, 2, 0, 1) \
209 V(Float32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
210 V(Float32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
211 V(Float32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
212 V(Float32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \
213 V(Float32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
214 V(Float32x4Select, Operator::kNoProperties, 3, 0, 1) \
215 V(Float32x4Swizzle, Operator::kNoProperties, 5, 0, 1) \
216 V(Float32x4Shuffle, Operator::kNoProperties, 6, 0, 1) \
217 V(Float32x4FromInt32x4, Operator::kNoProperties, 1, 0, 1) \
218 V(Float32x4FromUint32x4, Operator::kNoProperties, 1, 0, 1) \
219 V(CreateInt32x4, Operator::kNoProperties, 4, 0, 1) \
220 V(Int32x4ExtractLane, Operator::kNoProperties, 2, 0, 1) \
221 V(Int32x4ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
222 V(Int32x4Neg, Operator::kNoProperties, 1, 0, 1) \
223 V(Int32x4Add, Operator::kCommutative, 2, 0, 1) \
224 V(Int32x4Sub, Operator::kNoProperties, 2, 0, 1) \
225 V(Int32x4Mul, Operator::kCommutative, 2, 0, 1) \
226 V(Int32x4Min, Operator::kCommutative, 2, 0, 1) \
227 V(Int32x4Max, Operator::kCommutative, 2, 0, 1) \
228 V(Int32x4ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
229 V(Int32x4ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
230 V(Int32x4Equal, Operator::kCommutative, 2, 0, 1) \
231 V(Int32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
232 V(Int32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
233 V(Int32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
234 V(Int32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \
235 V(Int32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
236 V(Int32x4Select, Operator::kNoProperties, 3, 0, 1) \
237 V(Int32x4Swizzle, Operator::kNoProperties, 5, 0, 1) \
238 V(Int32x4Shuffle, Operator::kNoProperties, 6, 0, 1) \
239 V(Int32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \
240 V(Uint32x4Min, Operator::kCommutative, 2, 0, 1) \
241 V(Uint32x4Max, Operator::kCommutative, 2, 0, 1) \
242 V(Uint32x4ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
243 V(Uint32x4ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
244 V(Uint32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
245 V(Uint32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
246 V(Uint32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \
247 V(Uint32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
248 V(Uint32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \
249 V(CreateBool32x4, Operator::kNoProperties, 4, 0, 1) \
250 V(Bool32x4ExtractLane, Operator::kNoProperties, 2, 0, 1) \
251 V(Bool32x4ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
252 V(Bool32x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
253 V(Bool32x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
254 V(Bool32x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
255 V(Bool32x4Not, Operator::kNoProperties, 1, 0, 1) \
256 V(Bool32x4AnyTrue, Operator::kNoProperties, 1, 0, 1) \
257 V(Bool32x4AllTrue, Operator::kNoProperties, 1, 0, 1) \
258 V(Bool32x4Swizzle, Operator::kNoProperties, 5, 0, 1) \
259 V(Bool32x4Shuffle, Operator::kNoProperties, 6, 0, 1) \
260 V(Bool32x4Equal, Operator::kCommutative, 2, 0, 1) \
261 V(Bool32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
262 V(CreateInt16x8, Operator::kNoProperties, 8, 0, 1) \
263 V(Int16x8ExtractLane, Operator::kNoProperties, 2, 0, 1) \
264 V(Int16x8ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
265 V(Int16x8Neg, Operator::kNoProperties, 1, 0, 1) \
266 V(Int16x8Add, Operator::kCommutative, 2, 0, 1) \
267 V(Int16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \
268 V(Int16x8Sub, Operator::kNoProperties, 2, 0, 1) \
269 V(Int16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \
270 V(Int16x8Mul, Operator::kCommutative, 2, 0, 1) \
271 V(Int16x8Min, Operator::kCommutative, 2, 0, 1) \
272 V(Int16x8Max, Operator::kCommutative, 2, 0, 1) \
273 V(Int16x8ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
274 V(Int16x8ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
275 V(Int16x8Equal, Operator::kCommutative, 2, 0, 1) \
276 V(Int16x8NotEqual, Operator::kCommutative, 2, 0, 1) \
277 V(Int16x8LessThan, Operator::kNoProperties, 2, 0, 1) \
278 V(Int16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
279 V(Int16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \
280 V(Int16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
281 V(Int16x8Select, Operator::kNoProperties, 3, 0, 1) \
282 V(Int16x8Swizzle, Operator::kNoProperties, 9, 0, 1) \
283 V(Int16x8Shuffle, Operator::kNoProperties, 10, 0, 1) \
284 V(Uint16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \
285 V(Uint16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \
286 V(Uint16x8Min, Operator::kCommutative, 2, 0, 1) \
287 V(Uint16x8Max, Operator::kCommutative, 2, 0, 1) \
288 V(Uint16x8ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
289 V(Uint16x8ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
290 V(Uint16x8LessThan, Operator::kNoProperties, 2, 0, 1) \
291 V(Uint16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
292 V(Uint16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \
293 V(Uint16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
294 V(CreateBool16x8, Operator::kNoProperties, 8, 0, 1) \
295 V(Bool16x8ExtractLane, Operator::kNoProperties, 2, 0, 1) \
296 V(Bool16x8ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
297 V(Bool16x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
298 V(Bool16x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
299 V(Bool16x8Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
300 V(Bool16x8Not, Operator::kNoProperties, 1, 0, 1) \
301 V(Bool16x8AnyTrue, Operator::kNoProperties, 1, 0, 1) \
302 V(Bool16x8AllTrue, Operator::kNoProperties, 1, 0, 1) \
303 V(Bool16x8Swizzle, Operator::kNoProperties, 9, 0, 1) \
304 V(Bool16x8Shuffle, Operator::kNoProperties, 10, 0, 1) \
305 V(Bool16x8Equal, Operator::kCommutative, 2, 0, 1) \
306 V(Bool16x8NotEqual, Operator::kCommutative, 2, 0, 1) \
307 V(CreateInt8x16, Operator::kNoProperties, 16, 0, 1) \
308 V(Int8x16ExtractLane, Operator::kNoProperties, 2, 0, 1) \
309 V(Int8x16ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
310 V(Int8x16Neg, Operator::kNoProperties, 1, 0, 1) \
311 V(Int8x16Add, Operator::kCommutative, 2, 0, 1) \
312 V(Int8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \
313 V(Int8x16Sub, Operator::kNoProperties, 2, 0, 1) \
314 V(Int8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \
315 V(Int8x16Mul, Operator::kCommutative, 2, 0, 1) \
316 V(Int8x16Min, Operator::kCommutative, 2, 0, 1) \
317 V(Int8x16Max, Operator::kCommutative, 2, 0, 1) \
318 V(Int8x16ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
319 V(Int8x16ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
320 V(Int8x16Equal, Operator::kCommutative, 2, 0, 1) \
321 V(Int8x16NotEqual, Operator::kCommutative, 2, 0, 1) \
322 V(Int8x16LessThan, Operator::kNoProperties, 2, 0, 1) \
323 V(Int8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
324 V(Int8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \
325 V(Int8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
326 V(Int8x16Select, Operator::kNoProperties, 3, 0, 1) \
327 V(Int8x16Swizzle, Operator::kNoProperties, 17, 0, 1) \
328 V(Int8x16Shuffle, Operator::kNoProperties, 18, 0, 1) \
329 V(Uint8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \
330 V(Uint8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \
331 V(Uint8x16Min, Operator::kCommutative, 2, 0, 1) \
332 V(Uint8x16Max, Operator::kCommutative, 2, 0, 1) \
333 V(Uint8x16ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
334 V(Uint8x16ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
335 V(Uint8x16LessThan, Operator::kNoProperties, 2, 0, 1) \
336 V(Uint8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
337 V(Uint8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \
338 V(Uint8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
339 V(CreateBool8x16, Operator::kNoProperties, 16, 0, 1) \
340 V(Bool8x16ExtractLane, Operator::kNoProperties, 2, 0, 1) \
341 V(Bool8x16ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
342 V(Bool8x16And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
343 V(Bool8x16Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
344 V(Bool8x16Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
345 V(Bool8x16Not, Operator::kNoProperties, 1, 0, 1) \
346 V(Bool8x16AnyTrue, Operator::kNoProperties, 1, 0, 1) \
347 V(Bool8x16AllTrue, Operator::kNoProperties, 1, 0, 1) \
348 V(Bool8x16Swizzle, Operator::kNoProperties, 17, 0, 1) \
349 V(Bool8x16Shuffle, Operator::kNoProperties, 18, 0, 1) \
350 V(Bool8x16Equal, Operator::kCommutative, 2, 0, 1) \
351 V(Bool8x16NotEqual, Operator::kCommutative, 2, 0, 1) \
352 V(Simd128Load, Operator::kNoProperties, 2, 0, 1) \
353 V(Simd128Load1, Operator::kNoProperties, 2, 0, 1) \
354 V(Simd128Load2, Operator::kNoProperties, 2, 0, 1) \
355 V(Simd128Load3, Operator::kNoProperties, 2, 0, 1) \
356 V(Simd128Store, Operator::kNoProperties, 3, 0, 1) \
357 V(Simd128Store1, Operator::kNoProperties, 3, 0, 1) \
358 V(Simd128Store2, Operator::kNoProperties, 3, 0, 1) \
359 V(Simd128Store3, Operator::kNoProperties, 3, 0, 1) \
360 V(Simd128And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
361 V(Simd128Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
362 V(Simd128Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
363 V(Simd128Not, Operator::kNoProperties, 1, 0, 1)
192 364
193 #define PURE_OPTIONAL_OP_LIST(V) \ 365 #define PURE_OPTIONAL_OP_LIST(V) \
194 V(Word32Ctz, Operator::kNoProperties, 1, 0, 1) \ 366 V(Word32Ctz, Operator::kNoProperties, 1, 0, 1) \
195 V(Word64Ctz, Operator::kNoProperties, 1, 0, 1) \ 367 V(Word64Ctz, Operator::kNoProperties, 1, 0, 1) \
196 V(Word32ReverseBits, Operator::kNoProperties, 1, 0, 1) \ 368 V(Word32ReverseBits, Operator::kNoProperties, 1, 0, 1) \
197 V(Word64ReverseBits, Operator::kNoProperties, 1, 0, 1) \ 369 V(Word64ReverseBits, Operator::kNoProperties, 1, 0, 1) \
198 V(Word32Popcnt, Operator::kNoProperties, 1, 0, 1) \ 370 V(Word32Popcnt, Operator::kNoProperties, 1, 0, 1) \
199 V(Word64Popcnt, Operator::kNoProperties, 1, 0, 1) \ 371 V(Word64Popcnt, Operator::kNoProperties, 1, 0, 1) \
200 V(Float32Max, Operator::kNoProperties, 2, 0, 1) \ 372 V(Float32Max, Operator::kNoProperties, 2, 0, 1) \
201 V(Float32Min, Operator::kNoProperties, 2, 0, 1) \ 373 V(Float32Min, Operator::kNoProperties, 2, 0, 1) \
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 } 647 }
476 ATOMIC_TYPE_LIST(LOAD) 648 ATOMIC_TYPE_LIST(LOAD)
477 #undef LOAD 649 #undef LOAD
478 UNREACHABLE(); 650 UNREACHABLE();
479 return nullptr; 651 return nullptr;
480 } 652 }
481 653
482 } // namespace compiler 654 } // namespace compiler
483 } // namespace internal 655 } // namespace internal
484 } // namespace v8 656 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/machine-operator.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698