| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_ | 5 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_ |
| 6 #define V8_COMPILER_MACHINE_OPERATOR_H_ | 6 #define V8_COMPILER_MACHINE_OPERATOR_H_ |
| 7 | 7 |
| 8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
| 9 #include "src/machine-type.h" | 9 #include "src/machine-type.h" |
| 10 | 10 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 kUint32DivIsSafe = 1u << 14, | 123 kUint32DivIsSafe = 1u << 14, |
| 124 kWord32ShiftIsSafe = 1u << 15, | 124 kWord32ShiftIsSafe = 1u << 15, |
| 125 kWord32Ctz = 1u << 16, | 125 kWord32Ctz = 1u << 16, |
| 126 kWord64Ctz = 1u << 17, | 126 kWord64Ctz = 1u << 17, |
| 127 kWord32Popcnt = 1u << 18, | 127 kWord32Popcnt = 1u << 18, |
| 128 kWord64Popcnt = 1u << 19, | 128 kWord64Popcnt = 1u << 19, |
| 129 kWord32ReverseBits = 1u << 20, | 129 kWord32ReverseBits = 1u << 20, |
| 130 kWord64ReverseBits = 1u << 21, | 130 kWord64ReverseBits = 1u << 21, |
| 131 kFloat32Neg = 1u << 22, | 131 kFloat32Neg = 1u << 22, |
| 132 kFloat64Neg = 1u << 23, | 132 kFloat64Neg = 1u << 23, |
| 133 kAllOptionalOps = | 133 kWord32ReverseBytes = 1u << 24, |
| 134 kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min | | 134 kWord64ReverseBytes = 1u << 25, |
| 135 kFloat32RoundDown | kFloat64RoundDown | kFloat32RoundUp | | 135 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min | |
| 136 kFloat64RoundUp | kFloat32RoundTruncate | kFloat64RoundTruncate | | 136 kFloat32RoundDown | kFloat64RoundDown | kFloat32RoundUp | |
| 137 kFloat64RoundTiesAway | kFloat32RoundTiesEven | kFloat64RoundTiesEven | | 137 kFloat64RoundUp | kFloat32RoundTruncate | |
| 138 kWord32Ctz | kWord64Ctz | kWord32Popcnt | kWord64Popcnt | | 138 kFloat64RoundTruncate | kFloat64RoundTiesAway | |
| 139 kWord32ReverseBits | kWord64ReverseBits | kFloat32Neg | kFloat64Neg | 139 kFloat32RoundTiesEven | kFloat64RoundTiesEven | |
| 140 kWord32Ctz | kWord64Ctz | kWord32Popcnt | kWord64Popcnt | |
| 141 kWord32ReverseBits | kWord64ReverseBits | kFloat32Neg | |
| 142 kFloat64Neg | kWord32ReverseBytes | kWord64ReverseBytes |
| 140 }; | 143 }; |
| 141 typedef base::Flags<Flag, unsigned> Flags; | 144 typedef base::Flags<Flag, unsigned> Flags; |
| 142 | 145 |
| 143 class AlignmentRequirements { | 146 class AlignmentRequirements { |
| 144 public: | 147 public: |
| 145 enum UnalignedAccessSupport { kNoSupport, kSomeSupport, kFullSupport }; | 148 enum UnalignedAccessSupport { kNoSupport, kSomeSupport, kFullSupport }; |
| 146 | 149 |
| 147 bool IsUnalignedLoadSupported(const MachineType& machineType, | 150 bool IsUnalignedLoadSupported(const MachineType& machineType, |
| 148 uint8_t alignment) const { | 151 uint8_t alignment) const { |
| 149 return IsUnalignedSupported(unalignedLoadUnsupportedTypes_, machineType, | 152 return IsUnalignedSupported(unalignedLoadUnsupportedTypes_, machineType, |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 const Operator* Word32Shr(); | 222 const Operator* Word32Shr(); |
| 220 const Operator* Word32Sar(); | 223 const Operator* Word32Sar(); |
| 221 const Operator* Word32Ror(); | 224 const Operator* Word32Ror(); |
| 222 const Operator* Word32Equal(); | 225 const Operator* Word32Equal(); |
| 223 const Operator* Word32Clz(); | 226 const Operator* Word32Clz(); |
| 224 const OptionalOperator Word32Ctz(); | 227 const OptionalOperator Word32Ctz(); |
| 225 const OptionalOperator Word32Popcnt(); | 228 const OptionalOperator Word32Popcnt(); |
| 226 const OptionalOperator Word64Popcnt(); | 229 const OptionalOperator Word64Popcnt(); |
| 227 const OptionalOperator Word32ReverseBits(); | 230 const OptionalOperator Word32ReverseBits(); |
| 228 const OptionalOperator Word64ReverseBits(); | 231 const OptionalOperator Word64ReverseBits(); |
| 232 const OptionalOperator Word32ReverseBytes(); |
| 233 const OptionalOperator Word64ReverseBytes(); |
| 229 bool Word32ShiftIsSafe() const { return flags_ & kWord32ShiftIsSafe; } | 234 bool Word32ShiftIsSafe() const { return flags_ & kWord32ShiftIsSafe; } |
| 230 | 235 |
| 231 const Operator* Word64And(); | 236 const Operator* Word64And(); |
| 232 const Operator* Word64Or(); | 237 const Operator* Word64Or(); |
| 233 const Operator* Word64Xor(); | 238 const Operator* Word64Xor(); |
| 234 const Operator* Word64Shl(); | 239 const Operator* Word64Shl(); |
| 235 const Operator* Word64Shr(); | 240 const Operator* Word64Shr(); |
| 236 const Operator* Word64Sar(); | 241 const Operator* Word64Sar(); |
| 237 const Operator* Word64Ror(); | 242 const Operator* Word64Ror(); |
| 238 const Operator* Word64Clz(); | 243 const Operator* Word64Clz(); |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 }; | 703 }; |
| 699 | 704 |
| 700 | 705 |
| 701 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) | 706 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) |
| 702 | 707 |
| 703 } // namespace compiler | 708 } // namespace compiler |
| 704 } // namespace internal | 709 } // namespace internal |
| 705 } // namespace v8 | 710 } // namespace v8 |
| 706 | 711 |
| 707 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 712 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
| OLD | NEW |