| 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/compiler/machine-type.h" | 9 #include "src/compiler/machine-type.h" |
| 10 | 10 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 kFloat32Max = 1u << 0, | 110 kFloat32Max = 1u << 0, |
| 111 kFloat32Min = 1u << 1, | 111 kFloat32Min = 1u << 1, |
| 112 kFloat64Max = 1u << 2, | 112 kFloat64Max = 1u << 2, |
| 113 kFloat64Min = 1u << 3, | 113 kFloat64Min = 1u << 3, |
| 114 kFloat64RoundDown = 1u << 4, | 114 kFloat64RoundDown = 1u << 4, |
| 115 kFloat64RoundTruncate = 1u << 5, | 115 kFloat64RoundTruncate = 1u << 5, |
| 116 kFloat64RoundTiesAway = 1u << 6, | 116 kFloat64RoundTiesAway = 1u << 6, |
| 117 kInt32DivIsSafe = 1u << 7, | 117 kInt32DivIsSafe = 1u << 7, |
| 118 kUint32DivIsSafe = 1u << 8, | 118 kUint32DivIsSafe = 1u << 8, |
| 119 kWord32ShiftIsSafe = 1u << 9, | 119 kWord32ShiftIsSafe = 1u << 9, |
| 120 kWord32Ctz = 1u << 10, |
| 120 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min | | 121 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min | |
| 121 kFloat64RoundDown | kFloat64RoundTruncate | | 122 kFloat64RoundDown | kFloat64RoundTruncate | |
| 122 kFloat64RoundTiesAway | 123 kFloat64RoundTiesAway | kWord32Ctz |
| 123 }; | 124 }; |
| 124 typedef base::Flags<Flag, unsigned> Flags; | 125 typedef base::Flags<Flag, unsigned> Flags; |
| 125 | 126 |
| 126 explicit MachineOperatorBuilder(Zone* zone, MachineType word = kMachPtr, | 127 explicit MachineOperatorBuilder(Zone* zone, MachineType word = kMachPtr, |
| 127 Flags supportedOperators = kNoFlags); | 128 Flags supportedOperators = kNoFlags); |
| 128 | 129 |
| 129 const Operator* Word32And(); | 130 const Operator* Word32And(); |
| 130 const Operator* Word32Or(); | 131 const Operator* Word32Or(); |
| 131 const Operator* Word32Xor(); | 132 const Operator* Word32Xor(); |
| 132 const Operator* Word32Shl(); | 133 const Operator* Word32Shl(); |
| 133 const Operator* Word32Shr(); | 134 const Operator* Word32Shr(); |
| 134 const Operator* Word32Sar(); | 135 const Operator* Word32Sar(); |
| 135 const Operator* Word32Ror(); | 136 const Operator* Word32Ror(); |
| 136 const Operator* Word32Equal(); | 137 const Operator* Word32Equal(); |
| 137 const Operator* Word32Clz(); | 138 const Operator* Word32Clz(); |
| 139 const OptionalOperator Word32Ctz(); |
| 138 bool Word32ShiftIsSafe() const { return flags_ & kWord32ShiftIsSafe; } | 140 bool Word32ShiftIsSafe() const { return flags_ & kWord32ShiftIsSafe; } |
| 139 | 141 |
| 140 const Operator* Word64And(); | 142 const Operator* Word64And(); |
| 141 const Operator* Word64Or(); | 143 const Operator* Word64Or(); |
| 142 const Operator* Word64Xor(); | 144 const Operator* Word64Xor(); |
| 143 const Operator* Word64Shl(); | 145 const Operator* Word64Shl(); |
| 144 const Operator* Word64Shr(); | 146 const Operator* Word64Shr(); |
| 145 const Operator* Word64Sar(); | 147 const Operator* Word64Sar(); |
| 146 const Operator* Word64Ror(); | 148 const Operator* Word64Ror(); |
| 147 const Operator* Word64Equal(); | 149 const Operator* Word64Equal(); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 }; | 314 }; |
| 313 | 315 |
| 314 | 316 |
| 315 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) | 317 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) |
| 316 | 318 |
| 317 } // namespace compiler | 319 } // namespace compiler |
| 318 } // namespace internal | 320 } // namespace internal |
| 319 } // namespace v8 | 321 } // namespace v8 |
| 320 | 322 |
| 321 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 323 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
| OLD | NEW |