| 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/compiler/machine-type.h" | 8 #include "src/compiler/machine-type.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 const Operator* Int64Add(); | 97 const Operator* Int64Add(); |
| 98 const Operator* Int64Sub(); | 98 const Operator* Int64Sub(); |
| 99 const Operator* Int64Mul(); | 99 const Operator* Int64Mul(); |
| 100 const Operator* Int64Div(); | 100 const Operator* Int64Div(); |
| 101 const Operator* Int64UDiv(); | 101 const Operator* Int64UDiv(); |
| 102 const Operator* Int64Mod(); | 102 const Operator* Int64Mod(); |
| 103 const Operator* Int64UMod(); | 103 const Operator* Int64UMod(); |
| 104 const Operator* Int64LessThan(); | 104 const Operator* Int64LessThan(); |
| 105 const Operator* Int64LessThanOrEqual(); | 105 const Operator* Int64LessThanOrEqual(); |
| 106 | 106 |
| 107 // Convert representation of integers between float64 and int32/uint32. | 107 // These operators change the representation of numbers while preserving the |
| 108 // The precise rounding mode and handling of out of range inputs are *not* | 108 // value of the number. Narrowing operators assume the input is representable |
| 109 // defined for these operators, since they are intended only for use with | 109 // in the target type and are *not* defined for other inputs. |
| 110 // integers. | 110 // Use narrowing change operators only when there is a static guarantee that |
| 111 // the input value is representable in the target value. |
| 112 const Operator* ChangeFloat32ToFloat64(); |
| 113 const Operator* ChangeFloat64ToInt32(); // narrowing |
| 114 const Operator* ChangeFloat64ToUint32(); // narrowing |
| 111 const Operator* ChangeInt32ToFloat64(); | 115 const Operator* ChangeInt32ToFloat64(); |
| 116 const Operator* ChangeInt32ToInt64(); |
| 112 const Operator* ChangeUint32ToFloat64(); | 117 const Operator* ChangeUint32ToFloat64(); |
| 113 const Operator* ChangeFloat64ToInt32(); | |
| 114 const Operator* ChangeFloat64ToUint32(); | |
| 115 | |
| 116 // Sign/zero extend int32/uint32 to int64/uint64. | |
| 117 const Operator* ChangeInt32ToInt64(); | |
| 118 const Operator* ChangeUint32ToUint64(); | 118 const Operator* ChangeUint32ToUint64(); |
| 119 | 119 |
| 120 // Truncate double to int32 using JavaScript semantics. | 120 // These operators truncate numbers, both changing the representation of |
| 121 const Operator* TruncateFloat64ToInt32(); | 121 // the number and mapping multiple input values onto the same output value. |
| 122 | 122 const Operator* TruncateFloat64ToFloat32(); |
| 123 // Truncate the high order bits and convert the remaining bits to int32. | 123 const Operator* TruncateFloat64ToInt32(); // JavaScript semantics. |
| 124 const Operator* TruncateInt64ToInt32(); | 124 const Operator* TruncateInt64ToInt32(); |
| 125 | 125 |
| 126 // Floating point operators always operate with IEEE 754 round-to-nearest. | 126 // Floating point operators always operate with IEEE 754 round-to-nearest. |
| 127 const Operator* Float64Add(); | 127 const Operator* Float64Add(); |
| 128 const Operator* Float64Sub(); | 128 const Operator* Float64Sub(); |
| 129 const Operator* Float64Mul(); | 129 const Operator* Float64Mul(); |
| 130 const Operator* Float64Div(); | 130 const Operator* Float64Div(); |
| 131 const Operator* Float64Mod(); | 131 const Operator* Float64Mod(); |
| 132 | 132 |
| 133 // Floating point comparisons complying to IEEE 754. | 133 // Floating point comparisons complying to IEEE 754. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 private: | 177 private: |
| 178 const MachineOperatorBuilderImpl& impl_; | 178 const MachineOperatorBuilderImpl& impl_; |
| 179 const MachineType word_; | 179 const MachineType word_; |
| 180 }; | 180 }; |
| 181 | 181 |
| 182 } // namespace compiler | 182 } // namespace compiler |
| 183 } // namespace internal | 183 } // namespace internal |
| 184 } // namespace v8 | 184 } // namespace v8 |
| 185 | 185 |
| 186 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 186 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
| OLD | NEW |