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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 kFloat32Max = 1u << 0, | 115 kFloat32Max = 1u << 0, |
116 kFloat32Min = 1u << 1, | 116 kFloat32Min = 1u << 1, |
117 kFloat64Max = 1u << 2, | 117 kFloat64Max = 1u << 2, |
118 kFloat64Min = 1u << 3, | 118 kFloat64Min = 1u << 3, |
119 kFloat32RoundDown = 1u << 4, | 119 kFloat32RoundDown = 1u << 4, |
120 kFloat64RoundDown = 1u << 5, | 120 kFloat64RoundDown = 1u << 5, |
121 kFloat32RoundUp = 1u << 6, | 121 kFloat32RoundUp = 1u << 6, |
122 kFloat64RoundUp = 1u << 7, | 122 kFloat64RoundUp = 1u << 7, |
123 kFloat32RoundTruncate = 1u << 8, | 123 kFloat32RoundTruncate = 1u << 8, |
124 kFloat64RoundTruncate = 1u << 9, | 124 kFloat64RoundTruncate = 1u << 9, |
125 kFloat64RoundTiesEven = 1u << 10, | 125 kFloat32RoundTiesEven = 1u << 10, |
126 kFloat64RoundTiesAway = 1u << 11, | 126 kFloat64RoundTiesEven = 1u << 11, |
127 kInt32DivIsSafe = 1u << 12, | 127 kFloat64RoundTiesAway = 1u << 12, |
128 kUint32DivIsSafe = 1u << 13, | 128 kInt32DivIsSafe = 1u << 13, |
129 kWord32ShiftIsSafe = 1u << 14, | 129 kUint32DivIsSafe = 1u << 14, |
130 kWord32Ctz = 1u << 15, | 130 kWord32ShiftIsSafe = 1u << 15, |
131 kWord64Ctz = 1u << 16, | 131 kWord32Ctz = 1u << 16, |
132 kWord32Popcnt = 1u << 17, | 132 kWord64Ctz = 1u << 17, |
133 kWord64Popcnt = 1u << 18, | 133 kWord32Popcnt = 1u << 18, |
| 134 kWord64Popcnt = 1u << 19, |
134 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min | | 135 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min | |
135 kFloat32RoundDown | kFloat64RoundDown | kFloat32RoundUp | | 136 kFloat32RoundDown | kFloat64RoundDown | kFloat32RoundUp | |
136 kFloat64RoundUp | kFloat32RoundTruncate | | 137 kFloat64RoundUp | kFloat32RoundTruncate | |
137 kFloat64RoundTruncate | kFloat64RoundTiesAway | | 138 kFloat64RoundTruncate | kFloat64RoundTiesAway | |
138 kFloat64RoundTiesEven | kWord32Ctz | kWord64Ctz | | 139 kFloat32RoundTiesEven | kFloat64RoundTiesEven | |
139 kWord32Popcnt | kWord64Popcnt | 140 kWord32Ctz | kWord64Ctz | kWord32Popcnt | kWord64Popcnt |
140 }; | 141 }; |
141 typedef base::Flags<Flag, unsigned> Flags; | 142 typedef base::Flags<Flag, unsigned> Flags; |
142 | 143 |
143 explicit MachineOperatorBuilder(Zone* zone, MachineType word = kMachPtr, | 144 explicit MachineOperatorBuilder(Zone* zone, MachineType word = kMachPtr, |
144 Flags supportedOperators = kNoFlags); | 145 Flags supportedOperators = kNoFlags); |
145 | 146 |
146 const Operator* Word32And(); | 147 const Operator* Word32And(); |
147 const Operator* Word32Or(); | 148 const Operator* Word32Or(); |
148 const Operator* Word32Xor(); | 149 const Operator* Word32Xor(); |
149 const Operator* Word32Shl(); | 150 const Operator* Word32Shl(); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 const Operator* Float64Abs(); | 273 const Operator* Float64Abs(); |
273 | 274 |
274 // Floating point rounding. | 275 // Floating point rounding. |
275 const OptionalOperator Float32RoundDown(); | 276 const OptionalOperator Float32RoundDown(); |
276 const OptionalOperator Float64RoundDown(); | 277 const OptionalOperator Float64RoundDown(); |
277 const OptionalOperator Float32RoundUp(); | 278 const OptionalOperator Float32RoundUp(); |
278 const OptionalOperator Float64RoundUp(); | 279 const OptionalOperator Float64RoundUp(); |
279 const OptionalOperator Float32RoundTruncate(); | 280 const OptionalOperator Float32RoundTruncate(); |
280 const OptionalOperator Float64RoundTruncate(); | 281 const OptionalOperator Float64RoundTruncate(); |
281 const OptionalOperator Float64RoundTiesAway(); | 282 const OptionalOperator Float64RoundTiesAway(); |
| 283 const OptionalOperator Float32RoundTiesEven(); |
282 const OptionalOperator Float64RoundTiesEven(); | 284 const OptionalOperator Float64RoundTiesEven(); |
283 | 285 |
284 // Floating point bit representation. | 286 // Floating point bit representation. |
285 const Operator* Float64ExtractLowWord32(); | 287 const Operator* Float64ExtractLowWord32(); |
286 const Operator* Float64ExtractHighWord32(); | 288 const Operator* Float64ExtractHighWord32(); |
287 const Operator* Float64InsertLowWord32(); | 289 const Operator* Float64InsertLowWord32(); |
288 const Operator* Float64InsertHighWord32(); | 290 const Operator* Float64InsertHighWord32(); |
289 | 291 |
290 // load [base + index] | 292 // load [base + index] |
291 const Operator* Load(LoadRepresentation rep); | 293 const Operator* Load(LoadRepresentation rep); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 }; | 347 }; |
346 | 348 |
347 | 349 |
348 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) | 350 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) |
349 | 351 |
350 } // namespace compiler | 352 } // namespace compiler |
351 } // namespace internal | 353 } // namespace internal |
352 } // namespace v8 | 354 } // namespace v8 |
353 | 355 |
354 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 356 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
OLD | NEW |