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

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

Issue 2668013003: [Turbofan] Add more integer SIMD operations for ARM. (Closed)
Patch Set: Fix compile. Created 3 years, 10 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/wasm-compiler.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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 V(Float32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ 242 V(Float32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
243 V(Float32x4FromInt32x4, Operator::kNoProperties, 1, 0, 1) \ 243 V(Float32x4FromInt32x4, Operator::kNoProperties, 1, 0, 1) \
244 V(Float32x4FromUint32x4, Operator::kNoProperties, 1, 0, 1) \ 244 V(Float32x4FromUint32x4, Operator::kNoProperties, 1, 0, 1) \
245 V(CreateInt32x4, Operator::kNoProperties, 4, 0, 1) \ 245 V(CreateInt32x4, Operator::kNoProperties, 4, 0, 1) \
246 V(Int32x4Neg, Operator::kNoProperties, 1, 0, 1) \ 246 V(Int32x4Neg, Operator::kNoProperties, 1, 0, 1) \
247 V(Int32x4Add, Operator::kCommutative, 2, 0, 1) \ 247 V(Int32x4Add, Operator::kCommutative, 2, 0, 1) \
248 V(Int32x4Sub, Operator::kNoProperties, 2, 0, 1) \ 248 V(Int32x4Sub, Operator::kNoProperties, 2, 0, 1) \
249 V(Int32x4Mul, Operator::kCommutative, 2, 0, 1) \ 249 V(Int32x4Mul, Operator::kCommutative, 2, 0, 1) \
250 V(Int32x4Min, Operator::kCommutative, 2, 0, 1) \ 250 V(Int32x4Min, Operator::kCommutative, 2, 0, 1) \
251 V(Int32x4Max, Operator::kCommutative, 2, 0, 1) \ 251 V(Int32x4Max, Operator::kCommutative, 2, 0, 1) \
252 V(Int32x4ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
253 V(Int32x4ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
254 V(Int32x4Equal, Operator::kCommutative, 2, 0, 1) \ 252 V(Int32x4Equal, Operator::kCommutative, 2, 0, 1) \
255 V(Int32x4NotEqual, Operator::kCommutative, 2, 0, 1) \ 253 V(Int32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
256 V(Int32x4LessThan, Operator::kNoProperties, 2, 0, 1) \ 254 V(Int32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
257 V(Int32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ 255 V(Int32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
258 V(Int32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \ 256 V(Int32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \
259 V(Int32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ 257 V(Int32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
260 V(Int32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \ 258 V(Int32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \
261 V(Uint32x4Min, Operator::kCommutative, 2, 0, 1) \ 259 V(Uint32x4Min, Operator::kCommutative, 2, 0, 1) \
262 V(Uint32x4Max, Operator::kCommutative, 2, 0, 1) \ 260 V(Uint32x4Max, Operator::kCommutative, 2, 0, 1) \
263 V(Uint32x4ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
264 V(Uint32x4ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
265 V(Uint32x4LessThan, Operator::kNoProperties, 2, 0, 1) \ 261 V(Uint32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
266 V(Uint32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ 262 V(Uint32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
267 V(Uint32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \ 263 V(Uint32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \
268 V(Uint32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ 264 V(Uint32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
269 V(Uint32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \ 265 V(Uint32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \
270 V(CreateBool32x4, Operator::kNoProperties, 4, 0, 1) \ 266 V(CreateBool32x4, Operator::kNoProperties, 4, 0, 1) \
271 V(Bool32x4ExtractLane, Operator::kNoProperties, 2, 0, 1) \
272 V(Bool32x4ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
273 V(Bool32x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ 267 V(Bool32x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
274 V(Bool32x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ 268 V(Bool32x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
275 V(Bool32x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ 269 V(Bool32x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
276 V(Bool32x4Not, Operator::kNoProperties, 1, 0, 1) \ 270 V(Bool32x4Not, Operator::kNoProperties, 1, 0, 1) \
277 V(Bool32x4AnyTrue, Operator::kNoProperties, 1, 0, 1) \ 271 V(Bool32x4AnyTrue, Operator::kNoProperties, 1, 0, 1) \
278 V(Bool32x4AllTrue, Operator::kNoProperties, 1, 0, 1) \ 272 V(Bool32x4AllTrue, Operator::kNoProperties, 1, 0, 1) \
279 V(Bool32x4Swizzle, Operator::kNoProperties, 5, 0, 1) \ 273 V(Bool32x4Swizzle, Operator::kNoProperties, 5, 0, 1) \
280 V(Bool32x4Shuffle, Operator::kNoProperties, 6, 0, 1) \ 274 V(Bool32x4Shuffle, Operator::kNoProperties, 6, 0, 1) \
281 V(Bool32x4Equal, Operator::kCommutative, 2, 0, 1) \ 275 V(Bool32x4Equal, Operator::kCommutative, 2, 0, 1) \
282 V(Bool32x4NotEqual, Operator::kCommutative, 2, 0, 1) \ 276 V(Bool32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
283 V(CreateInt16x8, Operator::kNoProperties, 8, 0, 1) \ 277 V(CreateInt16x8, Operator::kNoProperties, 8, 0, 1) \
284 V(Int16x8Neg, Operator::kNoProperties, 1, 0, 1) \ 278 V(Int16x8Neg, Operator::kNoProperties, 1, 0, 1) \
285 V(Int16x8Add, Operator::kCommutative, 2, 0, 1) \ 279 V(Int16x8Add, Operator::kCommutative, 2, 0, 1) \
286 V(Int16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \ 280 V(Int16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \
287 V(Int16x8Sub, Operator::kNoProperties, 2, 0, 1) \ 281 V(Int16x8Sub, Operator::kNoProperties, 2, 0, 1) \
288 V(Int16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \ 282 V(Int16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \
289 V(Int16x8Mul, Operator::kCommutative, 2, 0, 1) \ 283 V(Int16x8Mul, Operator::kCommutative, 2, 0, 1) \
290 V(Int16x8Min, Operator::kCommutative, 2, 0, 1) \ 284 V(Int16x8Min, Operator::kCommutative, 2, 0, 1) \
291 V(Int16x8Max, Operator::kCommutative, 2, 0, 1) \ 285 V(Int16x8Max, Operator::kCommutative, 2, 0, 1) \
292 V(Int16x8ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
293 V(Int16x8ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
294 V(Int16x8Equal, Operator::kCommutative, 2, 0, 1) \ 286 V(Int16x8Equal, Operator::kCommutative, 2, 0, 1) \
295 V(Int16x8NotEqual, Operator::kCommutative, 2, 0, 1) \ 287 V(Int16x8NotEqual, Operator::kCommutative, 2, 0, 1) \
296 V(Int16x8LessThan, Operator::kNoProperties, 2, 0, 1) \ 288 V(Int16x8LessThan, Operator::kNoProperties, 2, 0, 1) \
297 V(Int16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ 289 V(Int16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
298 V(Int16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \ 290 V(Int16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \
299 V(Int16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ 291 V(Int16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
300 V(Int16x8Select, Operator::kNoProperties, 3, 0, 1) \ 292 V(Int16x8Select, Operator::kNoProperties, 3, 0, 1) \
301 V(Int16x8Swizzle, Operator::kNoProperties, 9, 0, 1) \ 293 V(Int16x8Swizzle, Operator::kNoProperties, 9, 0, 1) \
302 V(Int16x8Shuffle, Operator::kNoProperties, 10, 0, 1) \ 294 V(Int16x8Shuffle, Operator::kNoProperties, 10, 0, 1) \
303 V(Uint16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \ 295 V(Uint16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \
304 V(Uint16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \ 296 V(Uint16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \
305 V(Uint16x8Min, Operator::kCommutative, 2, 0, 1) \ 297 V(Uint16x8Min, Operator::kCommutative, 2, 0, 1) \
306 V(Uint16x8Max, Operator::kCommutative, 2, 0, 1) \ 298 V(Uint16x8Max, Operator::kCommutative, 2, 0, 1) \
307 V(Uint16x8ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
308 V(Uint16x8ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
309 V(Uint16x8LessThan, Operator::kNoProperties, 2, 0, 1) \ 299 V(Uint16x8LessThan, Operator::kNoProperties, 2, 0, 1) \
310 V(Uint16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ 300 V(Uint16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
311 V(Uint16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \ 301 V(Uint16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \
312 V(Uint16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ 302 V(Uint16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
313 V(CreateBool16x8, Operator::kNoProperties, 8, 0, 1) \ 303 V(CreateBool16x8, Operator::kNoProperties, 8, 0, 1) \
314 V(Bool16x8ExtractLane, Operator::kNoProperties, 2, 0, 1) \
315 V(Bool16x8ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
316 V(Bool16x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ 304 V(Bool16x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
317 V(Bool16x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ 305 V(Bool16x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
318 V(Bool16x8Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ 306 V(Bool16x8Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
319 V(Bool16x8Not, Operator::kNoProperties, 1, 0, 1) \ 307 V(Bool16x8Not, Operator::kNoProperties, 1, 0, 1) \
320 V(Bool16x8AnyTrue, Operator::kNoProperties, 1, 0, 1) \ 308 V(Bool16x8AnyTrue, Operator::kNoProperties, 1, 0, 1) \
321 V(Bool16x8AllTrue, Operator::kNoProperties, 1, 0, 1) \ 309 V(Bool16x8AllTrue, Operator::kNoProperties, 1, 0, 1) \
322 V(Bool16x8Swizzle, Operator::kNoProperties, 9, 0, 1) \ 310 V(Bool16x8Swizzle, Operator::kNoProperties, 9, 0, 1) \
323 V(Bool16x8Shuffle, Operator::kNoProperties, 10, 0, 1) \ 311 V(Bool16x8Shuffle, Operator::kNoProperties, 10, 0, 1) \
324 V(Bool16x8Equal, Operator::kCommutative, 2, 0, 1) \ 312 V(Bool16x8Equal, Operator::kCommutative, 2, 0, 1) \
325 V(Bool16x8NotEqual, Operator::kCommutative, 2, 0, 1) \ 313 V(Bool16x8NotEqual, Operator::kCommutative, 2, 0, 1) \
326 V(CreateInt8x16, Operator::kNoProperties, 16, 0, 1) \ 314 V(CreateInt8x16, Operator::kNoProperties, 16, 0, 1) \
327 V(Int8x16Neg, Operator::kNoProperties, 1, 0, 1) \ 315 V(Int8x16Neg, Operator::kNoProperties, 1, 0, 1) \
328 V(Int8x16Add, Operator::kCommutative, 2, 0, 1) \ 316 V(Int8x16Add, Operator::kCommutative, 2, 0, 1) \
329 V(Int8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \ 317 V(Int8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \
330 V(Int8x16Sub, Operator::kNoProperties, 2, 0, 1) \ 318 V(Int8x16Sub, Operator::kNoProperties, 2, 0, 1) \
331 V(Int8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \ 319 V(Int8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \
332 V(Int8x16Mul, Operator::kCommutative, 2, 0, 1) \ 320 V(Int8x16Mul, Operator::kCommutative, 2, 0, 1) \
333 V(Int8x16Min, Operator::kCommutative, 2, 0, 1) \ 321 V(Int8x16Min, Operator::kCommutative, 2, 0, 1) \
334 V(Int8x16Max, Operator::kCommutative, 2, 0, 1) \ 322 V(Int8x16Max, Operator::kCommutative, 2, 0, 1) \
335 V(Int8x16ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
336 V(Int8x16ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
337 V(Int8x16Equal, Operator::kCommutative, 2, 0, 1) \ 323 V(Int8x16Equal, Operator::kCommutative, 2, 0, 1) \
338 V(Int8x16NotEqual, Operator::kCommutative, 2, 0, 1) \ 324 V(Int8x16NotEqual, Operator::kCommutative, 2, 0, 1) \
339 V(Int8x16LessThan, Operator::kNoProperties, 2, 0, 1) \ 325 V(Int8x16LessThan, Operator::kNoProperties, 2, 0, 1) \
340 V(Int8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ 326 V(Int8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
341 V(Int8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \ 327 V(Int8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \
342 V(Int8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ 328 V(Int8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
343 V(Int8x16Select, Operator::kNoProperties, 3, 0, 1) \ 329 V(Int8x16Select, Operator::kNoProperties, 3, 0, 1) \
344 V(Int8x16Swizzle, Operator::kNoProperties, 17, 0, 1) \ 330 V(Int8x16Swizzle, Operator::kNoProperties, 17, 0, 1) \
345 V(Int8x16Shuffle, Operator::kNoProperties, 18, 0, 1) \ 331 V(Int8x16Shuffle, Operator::kNoProperties, 18, 0, 1) \
346 V(Uint8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \ 332 V(Uint8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \
347 V(Uint8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \ 333 V(Uint8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \
348 V(Uint8x16Min, Operator::kCommutative, 2, 0, 1) \ 334 V(Uint8x16Min, Operator::kCommutative, 2, 0, 1) \
349 V(Uint8x16Max, Operator::kCommutative, 2, 0, 1) \ 335 V(Uint8x16Max, Operator::kCommutative, 2, 0, 1) \
350 V(Uint8x16ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
351 V(Uint8x16ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
352 V(Uint8x16LessThan, Operator::kNoProperties, 2, 0, 1) \ 336 V(Uint8x16LessThan, Operator::kNoProperties, 2, 0, 1) \
353 V(Uint8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ 337 V(Uint8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
354 V(Uint8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \ 338 V(Uint8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \
355 V(Uint8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ 339 V(Uint8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
356 V(CreateBool8x16, Operator::kNoProperties, 16, 0, 1) \ 340 V(CreateBool8x16, Operator::kNoProperties, 16, 0, 1) \
357 V(Bool8x16ExtractLane, Operator::kNoProperties, 2, 0, 1) \
358 V(Bool8x16ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
359 V(Bool8x16And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ 341 V(Bool8x16And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
360 V(Bool8x16Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ 342 V(Bool8x16Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
361 V(Bool8x16Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ 343 V(Bool8x16Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
362 V(Bool8x16Not, Operator::kNoProperties, 1, 0, 1) \ 344 V(Bool8x16Not, Operator::kNoProperties, 1, 0, 1) \
363 V(Bool8x16AnyTrue, Operator::kNoProperties, 1, 0, 1) \ 345 V(Bool8x16AnyTrue, Operator::kNoProperties, 1, 0, 1) \
364 V(Bool8x16AllTrue, Operator::kNoProperties, 1, 0, 1) \ 346 V(Bool8x16AllTrue, Operator::kNoProperties, 1, 0, 1) \
365 V(Bool8x16Swizzle, Operator::kNoProperties, 17, 0, 1) \ 347 V(Bool8x16Swizzle, Operator::kNoProperties, 17, 0, 1) \
366 V(Bool8x16Shuffle, Operator::kNoProperties, 18, 0, 1) \ 348 V(Bool8x16Shuffle, Operator::kNoProperties, 18, 0, 1) \
367 V(Bool8x16Equal, Operator::kCommutative, 2, 0, 1) \ 349 V(Bool8x16Equal, Operator::kCommutative, 2, 0, 1) \
368 V(Bool8x16NotEqual, Operator::kCommutative, 2, 0, 1) \ 350 V(Bool8x16NotEqual, Operator::kCommutative, 2, 0, 1) \
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 V(Uint32) 428 V(Uint32)
447 429
448 #define ATOMIC_REPRESENTATION_LIST(V) \ 430 #define ATOMIC_REPRESENTATION_LIST(V) \
449 V(kWord8) \ 431 V(kWord8) \
450 V(kWord16) \ 432 V(kWord16) \
451 V(kWord32) 433 V(kWord32)
452 434
453 #define SIMD_LANE_OP_LIST(V) \ 435 #define SIMD_LANE_OP_LIST(V) \
454 V(Float32x4, 4) \ 436 V(Float32x4, 4) \
455 V(Int32x4, 4) \ 437 V(Int32x4, 4) \
438 V(Bool32x4, 4) \
456 V(Int16x8, 8) \ 439 V(Int16x8, 8) \
457 V(Int8x16, 16) 440 V(Bool16x8, 8) \
441 V(Int8x16, 16) \
442 V(Bool8x16, 16)
443
444 #define SIMD_SHIFT_OP_LIST(V) \
445 V(32x4, 32) \
446 V(16x8, 16) \
447 V(8x16, 8)
458 448
459 #define STACK_SLOT_CACHED_SIZES_LIST(V) V(4) V(8) V(16) 449 #define STACK_SLOT_CACHED_SIZES_LIST(V) V(4) V(8) V(16)
460 450
461 struct StackSlotOperator : public Operator1<int> { 451 struct StackSlotOperator : public Operator1<int> {
462 explicit StackSlotOperator(int size) 452 explicit StackSlotOperator(int size)
463 : Operator1<int>(IrOpcode::kStackSlot, 453 : Operator1<int>(IrOpcode::kStackSlot,
464 Operator::kNoDeopt | Operator::kNoThrow, "StackSlot", 0, 454 Operator::kNoDeopt | Operator::kNoThrow, "StackSlot", 0,
465 0, 0, 1, 0, 0, size) {} 455 0, 0, 1, 0, 0, size) {}
466 }; 456 };
467 457
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 AtomicStore##Type##Operator() \ 615 AtomicStore##Type##Operator() \
626 : Operator1<MachineRepresentation>( \ 616 : Operator1<MachineRepresentation>( \
627 IrOpcode::kAtomicStore, \ 617 IrOpcode::kAtomicStore, \
628 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \ 618 Operator::kNoDeopt | Operator::kNoRead | Operator::kNoThrow, \
629 "AtomicStore", 3, 1, 1, 0, 1, 0, MachineRepresentation::Type) {} \ 619 "AtomicStore", 3, 1, 1, 0, 1, 0, MachineRepresentation::Type) {} \
630 }; \ 620 }; \
631 AtomicStore##Type##Operator kAtomicStore##Type; 621 AtomicStore##Type##Operator kAtomicStore##Type;
632 ATOMIC_REPRESENTATION_LIST(ATOMIC_STORE) 622 ATOMIC_REPRESENTATION_LIST(ATOMIC_STORE)
633 #undef STORE 623 #undef STORE
634 624
635 #define SIMD_LANE_OPS(Name, lane_count) \
636 struct Name##ExtractLaneOperator final : public Operator1<int> { \
637 static int lane_number; \
638 Name##ExtractLaneOperator() \
639 : Operator1<int>(IrOpcode::k##Name##ExtractLane, Operator::kPure, \
640 "ExtractLane", 1, 0, 0, 1, 0, 0, lane_number++) {} \
641 }; \
642 struct Name##ReplaceLaneOperator final : public Operator1<int> { \
643 static int lane_number; \
644 Name##ReplaceLaneOperator() \
645 : Operator1<int>(IrOpcode::k##Name##ReplaceLane, Operator::kPure, \
646 "ReplaceLane", 2, 0, 0, 1, 0, 0, lane_number++) {} \
647 }; \
648 Name##ExtractLaneOperator k##Name##ExtractLane[lane_count]; \
649 Name##ReplaceLaneOperator k##Name##ReplaceLane[lane_count];
650 SIMD_LANE_OP_LIST(SIMD_LANE_OPS)
651 #undef SIMD_LANE_OPS
652
653 struct DebugBreakOperator : public Operator { 625 struct DebugBreakOperator : public Operator {
654 DebugBreakOperator() 626 DebugBreakOperator()
655 : Operator(IrOpcode::kDebugBreak, Operator::kNoThrow, "DebugBreak", 0, 627 : Operator(IrOpcode::kDebugBreak, Operator::kNoThrow, "DebugBreak", 0,
656 0, 0, 0, 0, 0) {} 628 0, 0, 0, 0, 0) {}
657 }; 629 };
658 DebugBreakOperator kDebugBreak; 630 DebugBreakOperator kDebugBreak;
659 631
660 struct UnsafePointerAddOperator final : public Operator { 632 struct UnsafePointerAddOperator final : public Operator {
661 UnsafePointerAddOperator() 633 UnsafePointerAddOperator()
662 : Operator(IrOpcode::kUnsafePointerAdd, Operator::kKontrol, 634 : Operator(IrOpcode::kUnsafePointerAdd, Operator::kKontrol,
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 #define STORE(kRep) \ 842 #define STORE(kRep) \
871 if (rep == MachineRepresentation::kRep) { \ 843 if (rep == MachineRepresentation::kRep) { \
872 return &cache_.kAtomicStore##kRep; \ 844 return &cache_.kAtomicStore##kRep; \
873 } 845 }
874 ATOMIC_REPRESENTATION_LIST(STORE) 846 ATOMIC_REPRESENTATION_LIST(STORE)
875 #undef STORE 847 #undef STORE
876 UNREACHABLE(); 848 UNREACHABLE();
877 return nullptr; 849 return nullptr;
878 } 850 }
879 851
880 #define SIMD_LANE_OPS(Name, lane_count) \ 852 #define SIMD_LANE_OPS(Type, lane_count) \
881 const Operator* MachineOperatorBuilder::Name##ExtractLane( \ 853 const Operator* MachineOperatorBuilder::Type##ExtractLane( \
882 int32_t lane_number) { \ 854 int32_t lane_index) { \
883 DCHECK(0 <= lane_number && lane_number < lane_count); \ 855 DCHECK(0 <= lane_index && lane_index < lane_count); \
884 return &cache_.k##Name##ExtractLane[lane_number]; \ 856 return new (zone_) \
885 } \ 857 Operator1<int32_t>(IrOpcode::k##Type##ExtractLane, Operator::kPure, \
886 const Operator* MachineOperatorBuilder::Name##ReplaceLane( \ 858 "Extract lane", 1, 0, 0, 1, 0, 0, lane_index); \
887 int32_t lane_number) { \ 859 } \
888 DCHECK(0 <= lane_number && lane_number < lane_count); \ 860 const Operator* MachineOperatorBuilder::Type##ReplaceLane( \
889 return &cache_.k##Name##ReplaceLane[lane_number]; \ 861 int32_t lane_index) { \
890 } \ 862 DCHECK(0 <= lane_index && lane_index < lane_count); \
891 int MachineOperatorGlobalCache::Name##ExtractLaneOperator::lane_number = 0; \ 863 return new (zone_) \
892 int MachineOperatorGlobalCache::Name##ReplaceLaneOperator::lane_number = 0; 864 Operator1<int32_t>(IrOpcode::k##Type##ReplaceLane, Operator::kPure, \
865 "Replace lane", 2, 0, 0, 1, 0, 0, lane_index); \
866 }
893 SIMD_LANE_OP_LIST(SIMD_LANE_OPS) 867 SIMD_LANE_OP_LIST(SIMD_LANE_OPS)
894 #undef SIMD_LANE_OPS 868 #undef SIMD_LANE_OPS
895 869
870 #define SIMD_SHIFT_OPS(format, bits) \
871 const Operator* MachineOperatorBuilder::Int##format##ShiftLeftByScalar( \
872 int32_t shift) { \
873 DCHECK(0 <= shift && shift < bits); \
874 return new (zone_) Operator1<int32_t>( \
875 IrOpcode::kInt##format##ShiftLeftByScalar, Operator::kPure, \
876 "Shift left", 1, 0, 0, 1, 0, 0, shift); \
877 } \
878 const Operator* MachineOperatorBuilder::Int##format##ShiftRightByScalar( \
879 int32_t shift) { \
880 DCHECK(0 < shift && shift <= bits); \
881 return new (zone_) Operator1<int32_t>( \
882 IrOpcode::kInt##format##ShiftRightByScalar, Operator::kPure, \
883 "Arithmetic shift right", 1, 0, 0, 1, 0, 0, shift); \
884 } \
885 const Operator* MachineOperatorBuilder::Uint##format##ShiftRightByScalar( \
886 int32_t shift) { \
887 DCHECK(0 <= shift && shift < bits); \
888 return new (zone_) Operator1<int32_t>( \
889 IrOpcode::kUint##format##ShiftRightByScalar, Operator::kPure, \
890 "Shift right", 1, 0, 0, 1, 0, 0, shift); \
891 }
892 SIMD_SHIFT_OP_LIST(SIMD_SHIFT_OPS)
893 #undef SIMD_SHIFT_OPS
894
896 } // namespace compiler 895 } // namespace compiler
897 } // namespace internal 896 } // namespace internal
898 } // namespace v8 897 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/machine-operator.h ('k') | src/compiler/wasm-compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698