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/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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 V(Int32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \ | 256 V(Int32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \ |
257 V(Int32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ | 257 V(Int32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ |
258 V(Int32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \ | 258 V(Int32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \ |
259 V(Uint32x4Min, Operator::kCommutative, 2, 0, 1) \ | 259 V(Uint32x4Min, Operator::kCommutative, 2, 0, 1) \ |
260 V(Uint32x4Max, Operator::kCommutative, 2, 0, 1) \ | 260 V(Uint32x4Max, Operator::kCommutative, 2, 0, 1) \ |
261 V(Uint32x4LessThan, Operator::kNoProperties, 2, 0, 1) \ | 261 V(Uint32x4LessThan, Operator::kNoProperties, 2, 0, 1) \ |
262 V(Uint32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ | 262 V(Uint32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ |
263 V(Uint32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \ | 263 V(Uint32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \ |
264 V(Uint32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ | 264 V(Uint32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ |
265 V(Uint32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \ | 265 V(Uint32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \ |
266 V(Bool32x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | |
267 V(Bool32x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | |
268 V(Bool32x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | |
269 V(Bool32x4Not, Operator::kNoProperties, 1, 0, 1) \ | |
270 V(Bool32x4AnyTrue, Operator::kNoProperties, 1, 0, 1) \ | |
271 V(Bool32x4AllTrue, Operator::kNoProperties, 1, 0, 1) \ | |
272 V(Int16x8Splat, Operator::kNoProperties, 1, 0, 1) \ | 266 V(Int16x8Splat, Operator::kNoProperties, 1, 0, 1) \ |
273 V(Int16x8Neg, Operator::kNoProperties, 1, 0, 1) \ | 267 V(Int16x8Neg, Operator::kNoProperties, 1, 0, 1) \ |
274 V(Int16x8Add, Operator::kCommutative, 2, 0, 1) \ | 268 V(Int16x8Add, Operator::kCommutative, 2, 0, 1) \ |
275 V(Int16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \ | 269 V(Int16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \ |
276 V(Int16x8Sub, Operator::kNoProperties, 2, 0, 1) \ | 270 V(Int16x8Sub, Operator::kNoProperties, 2, 0, 1) \ |
277 V(Int16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \ | 271 V(Int16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \ |
278 V(Int16x8Mul, Operator::kCommutative, 2, 0, 1) \ | 272 V(Int16x8Mul, Operator::kCommutative, 2, 0, 1) \ |
279 V(Int16x8Min, Operator::kCommutative, 2, 0, 1) \ | 273 V(Int16x8Min, Operator::kCommutative, 2, 0, 1) \ |
280 V(Int16x8Max, Operator::kCommutative, 2, 0, 1) \ | 274 V(Int16x8Max, Operator::kCommutative, 2, 0, 1) \ |
281 V(Int16x8Equal, Operator::kCommutative, 2, 0, 1) \ | 275 V(Int16x8Equal, Operator::kCommutative, 2, 0, 1) \ |
282 V(Int16x8NotEqual, Operator::kCommutative, 2, 0, 1) \ | 276 V(Int16x8NotEqual, Operator::kCommutative, 2, 0, 1) \ |
283 V(Int16x8LessThan, Operator::kNoProperties, 2, 0, 1) \ | 277 V(Int16x8LessThan, Operator::kNoProperties, 2, 0, 1) \ |
284 V(Int16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ | 278 V(Int16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ |
285 V(Int16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \ | 279 V(Int16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \ |
286 V(Int16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ | 280 V(Int16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ |
287 V(Uint16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \ | 281 V(Uint16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \ |
288 V(Uint16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \ | 282 V(Uint16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \ |
289 V(Uint16x8Min, Operator::kCommutative, 2, 0, 1) \ | 283 V(Uint16x8Min, Operator::kCommutative, 2, 0, 1) \ |
290 V(Uint16x8Max, Operator::kCommutative, 2, 0, 1) \ | 284 V(Uint16x8Max, Operator::kCommutative, 2, 0, 1) \ |
291 V(Uint16x8LessThan, Operator::kNoProperties, 2, 0, 1) \ | 285 V(Uint16x8LessThan, Operator::kNoProperties, 2, 0, 1) \ |
292 V(Uint16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ | 286 V(Uint16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ |
293 V(Uint16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \ | 287 V(Uint16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \ |
294 V(Uint16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ | 288 V(Uint16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ |
295 V(Bool16x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | |
296 V(Bool16x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | |
297 V(Bool16x8Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | |
298 V(Bool16x8Not, Operator::kNoProperties, 1, 0, 1) \ | |
299 V(Bool16x8AnyTrue, Operator::kNoProperties, 1, 0, 1) \ | |
300 V(Bool16x8AllTrue, Operator::kNoProperties, 1, 0, 1) \ | |
301 V(Int8x16Splat, Operator::kNoProperties, 1, 0, 1) \ | 289 V(Int8x16Splat, Operator::kNoProperties, 1, 0, 1) \ |
302 V(Int8x16Neg, Operator::kNoProperties, 1, 0, 1) \ | 290 V(Int8x16Neg, Operator::kNoProperties, 1, 0, 1) \ |
303 V(Int8x16Add, Operator::kCommutative, 2, 0, 1) \ | 291 V(Int8x16Add, Operator::kCommutative, 2, 0, 1) \ |
304 V(Int8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \ | 292 V(Int8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \ |
305 V(Int8x16Sub, Operator::kNoProperties, 2, 0, 1) \ | 293 V(Int8x16Sub, Operator::kNoProperties, 2, 0, 1) \ |
306 V(Int8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \ | 294 V(Int8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \ |
307 V(Int8x16Mul, Operator::kCommutative, 2, 0, 1) \ | 295 V(Int8x16Mul, Operator::kCommutative, 2, 0, 1) \ |
308 V(Int8x16Min, Operator::kCommutative, 2, 0, 1) \ | 296 V(Int8x16Min, Operator::kCommutative, 2, 0, 1) \ |
309 V(Int8x16Max, Operator::kCommutative, 2, 0, 1) \ | 297 V(Int8x16Max, Operator::kCommutative, 2, 0, 1) \ |
310 V(Int8x16Equal, Operator::kCommutative, 2, 0, 1) \ | 298 V(Int8x16Equal, Operator::kCommutative, 2, 0, 1) \ |
311 V(Int8x16NotEqual, Operator::kCommutative, 2, 0, 1) \ | 299 V(Int8x16NotEqual, Operator::kCommutative, 2, 0, 1) \ |
312 V(Int8x16LessThan, Operator::kNoProperties, 2, 0, 1) \ | 300 V(Int8x16LessThan, Operator::kNoProperties, 2, 0, 1) \ |
313 V(Int8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ | 301 V(Int8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ |
314 V(Int8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \ | 302 V(Int8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \ |
315 V(Int8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ | 303 V(Int8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ |
316 V(Uint8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \ | 304 V(Uint8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \ |
317 V(Uint8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \ | 305 V(Uint8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \ |
318 V(Uint8x16Min, Operator::kCommutative, 2, 0, 1) \ | 306 V(Uint8x16Min, Operator::kCommutative, 2, 0, 1) \ |
319 V(Uint8x16Max, Operator::kCommutative, 2, 0, 1) \ | 307 V(Uint8x16Max, Operator::kCommutative, 2, 0, 1) \ |
320 V(Uint8x16LessThan, Operator::kNoProperties, 2, 0, 1) \ | 308 V(Uint8x16LessThan, Operator::kNoProperties, 2, 0, 1) \ |
321 V(Uint8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ | 309 V(Uint8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ |
322 V(Uint8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \ | 310 V(Uint8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \ |
323 V(Uint8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ | 311 V(Uint8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \ |
324 V(Bool8x16And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | |
325 V(Bool8x16Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | |
326 V(Bool8x16Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | |
327 V(Bool8x16Not, Operator::kNoProperties, 1, 0, 1) \ | |
328 V(Bool8x16AnyTrue, Operator::kNoProperties, 1, 0, 1) \ | |
329 V(Bool8x16AllTrue, Operator::kNoProperties, 1, 0, 1) \ | |
330 V(Simd128Load, Operator::kNoProperties, 2, 0, 1) \ | 312 V(Simd128Load, Operator::kNoProperties, 2, 0, 1) \ |
331 V(Simd128Load1, Operator::kNoProperties, 2, 0, 1) \ | 313 V(Simd128Load1, Operator::kNoProperties, 2, 0, 1) \ |
332 V(Simd128Load2, Operator::kNoProperties, 2, 0, 1) \ | 314 V(Simd128Load2, Operator::kNoProperties, 2, 0, 1) \ |
333 V(Simd128Load3, Operator::kNoProperties, 2, 0, 1) \ | 315 V(Simd128Load3, Operator::kNoProperties, 2, 0, 1) \ |
334 V(Simd128Store, Operator::kNoProperties, 3, 0, 1) \ | 316 V(Simd128Store, Operator::kNoProperties, 3, 0, 1) \ |
335 V(Simd128Store1, Operator::kNoProperties, 3, 0, 1) \ | 317 V(Simd128Store1, Operator::kNoProperties, 3, 0, 1) \ |
336 V(Simd128Store2, Operator::kNoProperties, 3, 0, 1) \ | 318 V(Simd128Store2, Operator::kNoProperties, 3, 0, 1) \ |
337 V(Simd128Store3, Operator::kNoProperties, 3, 0, 1) \ | 319 V(Simd128Store3, Operator::kNoProperties, 3, 0, 1) \ |
338 V(Simd128Zero, Operator::kNoProperties, 0, 0, 1) \ | 320 V(Simd128Zero, Operator::kNoProperties, 0, 0, 1) \ |
339 V(Simd128And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 321 V(Simd128And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
340 V(Simd128Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 322 V(Simd128Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
341 V(Simd128Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 323 V(Simd128Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
342 V(Simd128Not, Operator::kNoProperties, 1, 0, 1) \ | 324 V(Simd128Not, Operator::kNoProperties, 1, 0, 1) \ |
343 V(Simd32x4Select, Operator::kNoProperties, 3, 0, 1) \ | 325 V(Simd32x4Select, Operator::kNoProperties, 3, 0, 1) \ |
344 V(Simd16x8Select, Operator::kNoProperties, 3, 0, 1) \ | 326 V(Simd16x8Select, Operator::kNoProperties, 3, 0, 1) \ |
345 V(Simd8x16Select, Operator::kNoProperties, 3, 0, 1) \ | 327 V(Simd8x16Select, Operator::kNoProperties, 3, 0, 1) \ |
346 V(Simd1x4Zero, Operator::kNoProperties, 0, 0, 1) \ | 328 V(Simd1x4Zero, Operator::kNoProperties, 0, 0, 1) \ |
| 329 V(Simd1x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 330 V(Simd1x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 331 V(Simd1x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 332 V(Simd1x4Not, Operator::kNoProperties, 1, 0, 1) \ |
| 333 V(Simd1x4AnyTrue, Operator::kNoProperties, 1, 0, 1) \ |
| 334 V(Simd1x4AllTrue, Operator::kNoProperties, 1, 0, 1) \ |
347 V(Simd1x8Zero, Operator::kNoProperties, 0, 0, 1) \ | 335 V(Simd1x8Zero, Operator::kNoProperties, 0, 0, 1) \ |
348 V(Simd1x16Zero, Operator::kNoProperties, 0, 0, 1) | 336 V(Simd1x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 337 V(Simd1x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 338 V(Simd1x8Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 339 V(Simd1x8Not, Operator::kNoProperties, 1, 0, 1) \ |
| 340 V(Simd1x8AnyTrue, Operator::kNoProperties, 1, 0, 1) \ |
| 341 V(Simd1x8AllTrue, Operator::kNoProperties, 1, 0, 1) \ |
| 342 V(Simd1x16Zero, Operator::kNoProperties, 0, 0, 1) \ |
| 343 V(Simd1x16And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 344 V(Simd1x16Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 345 V(Simd1x16Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 346 V(Simd1x16Not, Operator::kNoProperties, 1, 0, 1) \ |
| 347 V(Simd1x16AnyTrue, Operator::kNoProperties, 1, 0, 1) \ |
| 348 V(Simd1x16AllTrue, Operator::kNoProperties, 1, 0, 1) |
349 | 349 |
350 #define PURE_OPTIONAL_OP_LIST(V) \ | 350 #define PURE_OPTIONAL_OP_LIST(V) \ |
351 V(Word32Ctz, Operator::kNoProperties, 1, 0, 1) \ | 351 V(Word32Ctz, Operator::kNoProperties, 1, 0, 1) \ |
352 V(Word64Ctz, Operator::kNoProperties, 1, 0, 1) \ | 352 V(Word64Ctz, Operator::kNoProperties, 1, 0, 1) \ |
353 V(Word32ReverseBits, Operator::kNoProperties, 1, 0, 1) \ | 353 V(Word32ReverseBits, Operator::kNoProperties, 1, 0, 1) \ |
354 V(Word64ReverseBits, Operator::kNoProperties, 1, 0, 1) \ | 354 V(Word64ReverseBits, Operator::kNoProperties, 1, 0, 1) \ |
355 V(Word32ReverseBytes, Operator::kNoProperties, 1, 0, 1) \ | 355 V(Word32ReverseBytes, Operator::kNoProperties, 1, 0, 1) \ |
356 V(Word64ReverseBytes, Operator::kNoProperties, 1, 0, 1) \ | 356 V(Word64ReverseBytes, Operator::kNoProperties, 1, 0, 1) \ |
357 V(Word32Popcnt, Operator::kNoProperties, 1, 0, 1) \ | 357 V(Word32Popcnt, Operator::kNoProperties, 1, 0, 1) \ |
358 V(Word64Popcnt, Operator::kNoProperties, 1, 0, 1) \ | 358 V(Word64Popcnt, Operator::kNoProperties, 1, 0, 1) \ |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 return new (zone_) \ | 891 return new (zone_) \ |
892 Operator1<uint32_t>(IrOpcode::kSimd##format##Swizzle, Operator::kPure, \ | 892 Operator1<uint32_t>(IrOpcode::kSimd##format##Swizzle, Operator::kPure, \ |
893 "Swizzle", 2, 0, 0, 1, 0, 0, swizzle); \ | 893 "Swizzle", 2, 0, 0, 1, 0, 0, swizzle); \ |
894 } | 894 } |
895 SIMD_FORMAT_LIST(SIMD_PERMUTE_OPS) | 895 SIMD_FORMAT_LIST(SIMD_PERMUTE_OPS) |
896 #undef SIMD_PERMUTE_OPS | 896 #undef SIMD_PERMUTE_OPS |
897 | 897 |
898 } // namespace compiler | 898 } // namespace compiler |
899 } // namespace internal | 899 } // namespace internal |
900 } // namespace v8 | 900 } // namespace v8 |
OLD | NEW |