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 175 matching lines...) Loading... |
186 // Use narrowing change operators only when there is a static guarantee that | 186 // Use narrowing change operators only when there is a static guarantee that |
187 // the input value is representable in the target value. | 187 // the input value is representable in the target value. |
188 const Operator* ChangeFloat32ToFloat64(); | 188 const Operator* ChangeFloat32ToFloat64(); |
189 const Operator* ChangeFloat64ToInt32(); // narrowing | 189 const Operator* ChangeFloat64ToInt32(); // narrowing |
190 const Operator* ChangeFloat64ToUint32(); // narrowing | 190 const Operator* ChangeFloat64ToUint32(); // narrowing |
191 const Operator* ChangeInt32ToFloat64(); | 191 const Operator* ChangeInt32ToFloat64(); |
192 const Operator* ChangeInt32ToInt64(); | 192 const Operator* ChangeInt32ToInt64(); |
193 const Operator* ChangeUint32ToFloat64(); | 193 const Operator* ChangeUint32ToFloat64(); |
194 const Operator* ChangeUint32ToUint64(); | 194 const Operator* ChangeUint32ToUint64(); |
195 | 195 |
196 // These operators truncate numbers, both changing the representation of | 196 // These operators truncate or round numbers, both changing the representation |
197 // the number and mapping multiple input values onto the same output value. | 197 // of the number and mapping multiple input values onto the same output value. |
198 const Operator* TruncateFloat64ToFloat32(); | 198 const Operator* TruncateFloat64ToFloat32(); |
199 const Operator* TruncateFloat64ToInt32(TruncationMode); | 199 const Operator* TruncateFloat64ToInt32(TruncationMode); |
200 const Operator* TruncateInt64ToInt32(); | 200 const Operator* TruncateInt64ToInt32(); |
| 201 const Operator* RoundInt64ToFloat64(); |
201 | 202 |
202 // These operators reinterpret the bits of a floating point number as an | 203 // These operators reinterpret the bits of a floating point number as an |
203 // integer and vice versa. | 204 // integer and vice versa. |
204 const Operator* BitcastFloat32ToInt32(); | 205 const Operator* BitcastFloat32ToInt32(); |
205 const Operator* BitcastFloat64ToInt64(); | 206 const Operator* BitcastFloat64ToInt64(); |
206 const Operator* BitcastInt32ToFloat32(); | 207 const Operator* BitcastInt32ToFloat32(); |
207 const Operator* BitcastInt64ToFloat64(); | 208 const Operator* BitcastInt64ToFloat64(); |
208 | 209 |
209 // Floating point operators always operate with IEEE 754 round-to-nearest | 210 // Floating point operators always operate with IEEE 754 round-to-nearest |
210 // (single-precision). | 211 // (single-precision). |
(...skipping 105 matching lines...) Loading... |
316 }; | 317 }; |
317 | 318 |
318 | 319 |
319 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) | 320 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) |
320 | 321 |
321 } // namespace compiler | 322 } // namespace compiler |
322 } // namespace internal | 323 } // namespace internal |
323 } // namespace v8 | 324 } // namespace v8 |
324 | 325 |
325 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 326 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
OLD | NEW |