| 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 V(I8x16MaxU, Operator::kCommutative, 2, 0, 1) \ | 313 V(I8x16MaxU, Operator::kCommutative, 2, 0, 1) \ |
| 314 V(I8x16LtU, Operator::kNoProperties, 2, 0, 1) \ | 314 V(I8x16LtU, Operator::kNoProperties, 2, 0, 1) \ |
| 315 V(I8x16LeU, Operator::kNoProperties, 2, 0, 1) \ | 315 V(I8x16LeU, Operator::kNoProperties, 2, 0, 1) \ |
| 316 V(S128Load, Operator::kNoProperties, 2, 0, 1) \ | 316 V(S128Load, Operator::kNoProperties, 2, 0, 1) \ |
| 317 V(S128Store, Operator::kNoProperties, 3, 0, 1) \ | 317 V(S128Store, Operator::kNoProperties, 3, 0, 1) \ |
| 318 V(S128Zero, Operator::kNoProperties, 0, 0, 1) \ | 318 V(S128Zero, Operator::kNoProperties, 0, 0, 1) \ |
| 319 V(S128And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 319 V(S128And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 320 V(S128Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 320 V(S128Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 321 V(S128Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 321 V(S128Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 322 V(S128Not, Operator::kNoProperties, 1, 0, 1) \ | 322 V(S128Not, Operator::kNoProperties, 1, 0, 1) \ |
| 323 V(S32x4ZipLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 324 V(S32x4ZipRight, Operator::kNoProperties, 2, 0, 1) \ |
| 325 V(S32x4UnzipLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 326 V(S32x4UnzipRight, Operator::kNoProperties, 2, 0, 1) \ |
| 327 V(S32x4TransposeLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 328 V(S32x4TransposeRight, Operator::kNoProperties, 2, 0, 1) \ |
| 323 V(S32x4Select, Operator::kNoProperties, 3, 0, 1) \ | 329 V(S32x4Select, Operator::kNoProperties, 3, 0, 1) \ |
| 330 V(S16x8ZipLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 331 V(S16x8ZipRight, Operator::kNoProperties, 2, 0, 1) \ |
| 332 V(S16x8UnzipLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 333 V(S16x8UnzipRight, Operator::kNoProperties, 2, 0, 1) \ |
| 334 V(S16x8TransposeLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 335 V(S16x8TransposeRight, Operator::kNoProperties, 2, 0, 1) \ |
| 324 V(S16x8Select, Operator::kNoProperties, 3, 0, 1) \ | 336 V(S16x8Select, Operator::kNoProperties, 3, 0, 1) \ |
| 337 V(S8x16ZipLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 338 V(S8x16ZipRight, Operator::kNoProperties, 2, 0, 1) \ |
| 339 V(S8x16UnzipLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 340 V(S8x16UnzipRight, Operator::kNoProperties, 2, 0, 1) \ |
| 341 V(S8x16TransposeLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 342 V(S8x16TransposeRight, Operator::kNoProperties, 2, 0, 1) \ |
| 325 V(S8x16Select, Operator::kNoProperties, 3, 0, 1) \ | 343 V(S8x16Select, Operator::kNoProperties, 3, 0, 1) \ |
| 344 V(S32x2Reverse, Operator::kNoProperties, 1, 0, 1) \ |
| 345 V(S16x4Reverse, Operator::kNoProperties, 1, 0, 1) \ |
| 346 V(S16x2Reverse, Operator::kNoProperties, 1, 0, 1) \ |
| 347 V(S8x8Reverse, Operator::kNoProperties, 1, 0, 1) \ |
| 348 V(S8x4Reverse, Operator::kNoProperties, 1, 0, 1) \ |
| 349 V(S8x2Reverse, Operator::kNoProperties, 1, 0, 1) \ |
| 326 V(S1x4Zero, Operator::kNoProperties, 0, 0, 1) \ | 350 V(S1x4Zero, Operator::kNoProperties, 0, 0, 1) \ |
| 327 V(S1x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 351 V(S1x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 328 V(S1x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 352 V(S1x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 329 V(S1x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 353 V(S1x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 330 V(S1x4Not, Operator::kNoProperties, 1, 0, 1) \ | 354 V(S1x4Not, Operator::kNoProperties, 1, 0, 1) \ |
| 331 V(S1x4AnyTrue, Operator::kNoProperties, 1, 0, 1) \ | 355 V(S1x4AnyTrue, Operator::kNoProperties, 1, 0, 1) \ |
| 332 V(S1x4AllTrue, Operator::kNoProperties, 1, 0, 1) \ | 356 V(S1x4AllTrue, Operator::kNoProperties, 1, 0, 1) \ |
| 333 V(S1x8Zero, Operator::kNoProperties, 0, 0, 1) \ | 357 V(S1x8Zero, Operator::kNoProperties, 0, 0, 1) \ |
| 334 V(S1x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 358 V(S1x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 335 V(S1x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 359 V(S1x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 } \ | 1024 } \ |
| 1001 const Operator* MachineOperatorBuilder::I##format##ShrU(int32_t shift) { \ | 1025 const Operator* MachineOperatorBuilder::I##format##ShrU(int32_t shift) { \ |
| 1002 DCHECK(0 <= shift && shift < bits); \ | 1026 DCHECK(0 <= shift && shift < bits); \ |
| 1003 return new (zone_) \ | 1027 return new (zone_) \ |
| 1004 Operator1<int32_t>(IrOpcode::kI##format##ShrU, Operator::kPure, \ | 1028 Operator1<int32_t>(IrOpcode::kI##format##ShrU, Operator::kPure, \ |
| 1005 "Shift right", 1, 0, 0, 1, 0, 0, shift); \ | 1029 "Shift right", 1, 0, 0, 1, 0, 0, shift); \ |
| 1006 } | 1030 } |
| 1007 SIMD_FORMAT_LIST(SIMD_SHIFT_OPS) | 1031 SIMD_FORMAT_LIST(SIMD_SHIFT_OPS) |
| 1008 #undef SIMD_SHIFT_OPS | 1032 #undef SIMD_SHIFT_OPS |
| 1009 | 1033 |
| 1010 // TODO(bbudge) Add Shuffle, DCHECKs based on format. | 1034 const Operator* MachineOperatorBuilder::S8x16Concat(int32_t bytes) { |
| 1011 #define SIMD_PERMUTE_OPS(format, bits) \ | 1035 DCHECK(0 <= bytes && bytes < kSimd128Size); |
| 1012 const Operator* MachineOperatorBuilder::S##format##Swizzle( \ | 1036 return new (zone_) Operator1<int32_t>(IrOpcode::kS8x16Concat, Operator::kPure, |
| 1013 uint32_t swizzle) { \ | 1037 "Concat", 2, 0, 0, 1, 0, 0, bytes); |
| 1014 return new (zone_) \ | 1038 } |
| 1015 Operator1<uint32_t>(IrOpcode::kS##format##Swizzle, Operator::kPure, \ | |
| 1016 "Swizzle", 2, 0, 0, 1, 0, 0, swizzle); \ | |
| 1017 } | |
| 1018 SIMD_FORMAT_LIST(SIMD_PERMUTE_OPS) | |
| 1019 #undef SIMD_PERMUTE_OPS | |
| 1020 | 1039 |
| 1021 } // namespace compiler | 1040 } // namespace compiler |
| 1022 } // namespace internal | 1041 } // namespace internal |
| 1023 } // namespace v8 | 1042 } // namespace v8 |
| OLD | NEW |