| 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 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 } \ | 974 } \ |
| 975 const Operator* MachineOperatorBuilder::I##format##ShrU(int32_t shift) { \ | 975 const Operator* MachineOperatorBuilder::I##format##ShrU(int32_t shift) { \ |
| 976 DCHECK(0 <= shift && shift < bits); \ | 976 DCHECK(0 <= shift && shift < bits); \ |
| 977 return new (zone_) \ | 977 return new (zone_) \ |
| 978 Operator1<int32_t>(IrOpcode::kI##format##ShrU, Operator::kPure, \ | 978 Operator1<int32_t>(IrOpcode::kI##format##ShrU, Operator::kPure, \ |
| 979 "Shift right", 1, 0, 0, 1, 0, 0, shift); \ | 979 "Shift right", 1, 0, 0, 1, 0, 0, shift); \ |
| 980 } | 980 } |
| 981 SIMD_FORMAT_LIST(SIMD_SHIFT_OPS) | 981 SIMD_FORMAT_LIST(SIMD_SHIFT_OPS) |
| 982 #undef SIMD_SHIFT_OPS | 982 #undef SIMD_SHIFT_OPS |
| 983 | 983 |
| 984 const Operator* MachineOperatorBuilder::S32x4Shuffle(uint8_t shuffle[16]) { | |
| 985 uint8_t* array = zone_->NewArray<uint8_t>(4); | |
| 986 memcpy(array, shuffle, 4); | |
| 987 return new (zone_) | |
| 988 Operator1<uint8_t*>(IrOpcode::kS32x4Shuffle, Operator::kPure, "Shuffle", | |
| 989 2, 0, 0, 1, 0, 0, array); | |
| 990 } | |
| 991 | |
| 992 const Operator* MachineOperatorBuilder::S16x8Shuffle(uint8_t shuffle[16]) { | |
| 993 uint8_t* array = zone_->NewArray<uint8_t>(8); | |
| 994 memcpy(array, shuffle, 8); | |
| 995 return new (zone_) | |
| 996 Operator1<uint8_t*>(IrOpcode::kS16x8Shuffle, Operator::kPure, "Shuffle", | |
| 997 2, 0, 0, 1, 0, 0, array); | |
| 998 } | |
| 999 | |
| 1000 const Operator* MachineOperatorBuilder::S8x16Shuffle(uint8_t shuffle[16]) { | 984 const Operator* MachineOperatorBuilder::S8x16Shuffle(uint8_t shuffle[16]) { |
| 1001 uint8_t* array = zone_->NewArray<uint8_t>(16); | 985 uint8_t* array = zone_->NewArray<uint8_t>(16); |
| 1002 memcpy(array, shuffle, 16); | 986 memcpy(array, shuffle, 16); |
| 1003 return new (zone_) | 987 return new (zone_) |
| 1004 Operator1<uint8_t*>(IrOpcode::kS8x16Shuffle, Operator::kPure, "Shuffle", | 988 Operator1<uint8_t*>(IrOpcode::kS8x16Shuffle, Operator::kPure, "Shuffle", |
| 1005 2, 0, 0, 1, 0, 0, array); | 989 2, 0, 0, 1, 0, 0, array); |
| 1006 } | 990 } |
| 1007 | 991 |
| 1008 } // namespace compiler | 992 } // namespace compiler |
| 1009 } // namespace internal | 993 } // namespace internal |
| 1010 } // namespace v8 | 994 } // namespace v8 |
| OLD | NEW |