| 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 V(I8x16MaxU, Operator::kCommutative, 2, 0, 1) \ | 307 V(I8x16MaxU, Operator::kCommutative, 2, 0, 1) \ |
| 308 V(I8x16LtU, Operator::kNoProperties, 2, 0, 1) \ | 308 V(I8x16LtU, Operator::kNoProperties, 2, 0, 1) \ |
| 309 V(I8x16LeU, Operator::kNoProperties, 2, 0, 1) \ | 309 V(I8x16LeU, Operator::kNoProperties, 2, 0, 1) \ |
| 310 V(S128Load, Operator::kNoProperties, 2, 0, 1) \ | 310 V(S128Load, Operator::kNoProperties, 2, 0, 1) \ |
| 311 V(S128Store, Operator::kNoProperties, 3, 0, 1) \ | 311 V(S128Store, Operator::kNoProperties, 3, 0, 1) \ |
| 312 V(S128Zero, Operator::kNoProperties, 0, 0, 1) \ | 312 V(S128Zero, Operator::kNoProperties, 0, 0, 1) \ |
| 313 V(S128And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 313 V(S128And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 314 V(S128Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 314 V(S128Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 315 V(S128Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 315 V(S128Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 316 V(S128Not, Operator::kNoProperties, 1, 0, 1) \ | 316 V(S128Not, Operator::kNoProperties, 1, 0, 1) \ |
| 317 V(S32x4ZipLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 318 V(S32x4ZipRight, Operator::kNoProperties, 2, 0, 1) \ |
| 319 V(S32x4UnzipLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 320 V(S32x4UnzipRight, Operator::kNoProperties, 2, 0, 1) \ |
| 321 V(S32x4TransposeLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 322 V(S32x4TransposeRight, Operator::kNoProperties, 2, 0, 1) \ |
| 317 V(S32x4Select, Operator::kNoProperties, 3, 0, 1) \ | 323 V(S32x4Select, Operator::kNoProperties, 3, 0, 1) \ |
| 324 V(S16x8ZipLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 325 V(S16x8ZipRight, Operator::kNoProperties, 2, 0, 1) \ |
| 326 V(S16x8UnzipLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 327 V(S16x8UnzipRight, Operator::kNoProperties, 2, 0, 1) \ |
| 328 V(S16x8TransposeLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 329 V(S16x8TransposeRight, Operator::kNoProperties, 2, 0, 1) \ |
| 318 V(S16x8Select, Operator::kNoProperties, 3, 0, 1) \ | 330 V(S16x8Select, Operator::kNoProperties, 3, 0, 1) \ |
| 331 V(S8x16ZipLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 332 V(S8x16ZipRight, Operator::kNoProperties, 2, 0, 1) \ |
| 333 V(S8x16UnzipLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 334 V(S8x16UnzipRight, Operator::kNoProperties, 2, 0, 1) \ |
| 335 V(S8x16TransposeLeft, Operator::kNoProperties, 2, 0, 1) \ |
| 336 V(S8x16TransposeRight, Operator::kNoProperties, 2, 0, 1) \ |
| 319 V(S8x16Select, Operator::kNoProperties, 3, 0, 1) \ | 337 V(S8x16Select, Operator::kNoProperties, 3, 0, 1) \ |
| 338 V(S32x2Reverse, Operator::kNoProperties, 1, 0, 1) \ |
| 339 V(S16x4Reverse, Operator::kNoProperties, 1, 0, 1) \ |
| 340 V(S16x2Reverse, Operator::kNoProperties, 1, 0, 1) \ |
| 341 V(S8x8Reverse, Operator::kNoProperties, 1, 0, 1) \ |
| 342 V(S8x4Reverse, Operator::kNoProperties, 1, 0, 1) \ |
| 343 V(S8x2Reverse, Operator::kNoProperties, 1, 0, 1) \ |
| 320 V(S1x4Zero, Operator::kNoProperties, 0, 0, 1) \ | 344 V(S1x4Zero, Operator::kNoProperties, 0, 0, 1) \ |
| 321 V(S1x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 345 V(S1x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 322 V(S1x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 346 V(S1x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 323 V(S1x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 347 V(S1x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 324 V(S1x4Not, Operator::kNoProperties, 1, 0, 1) \ | 348 V(S1x4Not, Operator::kNoProperties, 1, 0, 1) \ |
| 325 V(S1x4AnyTrue, Operator::kNoProperties, 1, 0, 1) \ | 349 V(S1x4AnyTrue, Operator::kNoProperties, 1, 0, 1) \ |
| 326 V(S1x4AllTrue, Operator::kNoProperties, 1, 0, 1) \ | 350 V(S1x4AllTrue, Operator::kNoProperties, 1, 0, 1) \ |
| 327 V(S1x8Zero, Operator::kNoProperties, 0, 0, 1) \ | 351 V(S1x8Zero, Operator::kNoProperties, 0, 0, 1) \ |
| 328 V(S1x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 352 V(S1x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| 329 V(S1x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ | 353 V(S1x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \ |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 } \ | 956 } \ |
| 933 const Operator* MachineOperatorBuilder::I##format##ShrU(int32_t shift) { \ | 957 const Operator* MachineOperatorBuilder::I##format##ShrU(int32_t shift) { \ |
| 934 DCHECK(0 <= shift && shift < bits); \ | 958 DCHECK(0 <= shift && shift < bits); \ |
| 935 return new (zone_) \ | 959 return new (zone_) \ |
| 936 Operator1<int32_t>(IrOpcode::kI##format##ShrU, Operator::kPure, \ | 960 Operator1<int32_t>(IrOpcode::kI##format##ShrU, Operator::kPure, \ |
| 937 "Shift right", 1, 0, 0, 1, 0, 0, shift); \ | 961 "Shift right", 1, 0, 0, 1, 0, 0, shift); \ |
| 938 } | 962 } |
| 939 SIMD_FORMAT_LIST(SIMD_SHIFT_OPS) | 963 SIMD_FORMAT_LIST(SIMD_SHIFT_OPS) |
| 940 #undef SIMD_SHIFT_OPS | 964 #undef SIMD_SHIFT_OPS |
| 941 | 965 |
| 942 // TODO(bbudge) Add Shuffle, DCHECKs based on format. | 966 const Operator* MachineOperatorBuilder::S8x16Concat(int32_t bytes) { |
| 943 #define SIMD_PERMUTE_OPS(format, bits) \ | 967 DCHECK(0 <= bytes && bytes < kSimd128Size); |
| 944 const Operator* MachineOperatorBuilder::S##format##Swizzle( \ | 968 return new (zone_) Operator1<int32_t>(IrOpcode::kS8x16Concat, Operator::kPure, |
| 945 uint32_t swizzle) { \ | 969 "Concat", 2, 0, 0, 1, 0, 0, bytes); |
| 946 return new (zone_) \ | 970 } |
| 947 Operator1<uint32_t>(IrOpcode::kS##format##Swizzle, Operator::kPure, \ | |
| 948 "Swizzle", 2, 0, 0, 1, 0, 0, swizzle); \ | |
| 949 } | |
| 950 SIMD_FORMAT_LIST(SIMD_PERMUTE_OPS) | |
| 951 #undef SIMD_PERMUTE_OPS | |
| 952 | 971 |
| 953 } // namespace compiler | 972 } // namespace compiler |
| 954 } // namespace internal | 973 } // namespace internal |
| 955 } // namespace v8 | 974 } // namespace v8 |
| OLD | NEW |