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 | 97 |
98 const Operator* Int64Add(); | 98 const Operator* Int64Add(); |
99 const Operator* Int64Sub(); | 99 const Operator* Int64Sub(); |
100 const Operator* Int64Mul(); | 100 const Operator* Int64Mul(); |
101 const Operator* Int64Div(); | 101 const Operator* Int64Div(); |
102 const Operator* Int64UDiv(); | 102 const Operator* Int64UDiv(); |
103 const Operator* Int64Mod(); | 103 const Operator* Int64Mod(); |
104 const Operator* Int64UMod(); | 104 const Operator* Int64UMod(); |
105 const Operator* Int64LessThan(); | 105 const Operator* Int64LessThan(); |
106 const Operator* Int64LessThanOrEqual(); | 106 const Operator* Int64LessThanOrEqual(); |
| 107 const Operator* Uint64LessThan(); |
107 | 108 |
108 // These operators change the representation of numbers while preserving the | 109 // These operators change the representation of numbers while preserving the |
109 // value of the number. Narrowing operators assume the input is representable | 110 // value of the number. Narrowing operators assume the input is representable |
110 // in the target type and are *not* defined for other inputs. | 111 // in the target type and are *not* defined for other inputs. |
111 // Use narrowing change operators only when there is a static guarantee that | 112 // Use narrowing change operators only when there is a static guarantee that |
112 // the input value is representable in the target value. | 113 // the input value is representable in the target value. |
113 const Operator* ChangeFloat32ToFloat64(); | 114 const Operator* ChangeFloat32ToFloat64(); |
114 const Operator* ChangeFloat64ToInt32(); // narrowing | 115 const Operator* ChangeFloat64ToInt32(); // narrowing |
115 const Operator* ChangeFloat64ToUint32(); // narrowing | 116 const Operator* ChangeFloat64ToUint32(); // narrowing |
116 const Operator* ChangeInt32ToFloat64(); | 117 const Operator* ChangeInt32ToFloat64(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 V(Word, Ror) \ | 161 V(Word, Ror) \ |
161 V(Word, Equal) \ | 162 V(Word, Equal) \ |
162 V(Int, Add) \ | 163 V(Int, Add) \ |
163 V(Int, Sub) \ | 164 V(Int, Sub) \ |
164 V(Int, Mul) \ | 165 V(Int, Mul) \ |
165 V(Int, Div) \ | 166 V(Int, Div) \ |
166 V(Int, UDiv) \ | 167 V(Int, UDiv) \ |
167 V(Int, Mod) \ | 168 V(Int, Mod) \ |
168 V(Int, UMod) \ | 169 V(Int, UMod) \ |
169 V(Int, LessThan) \ | 170 V(Int, LessThan) \ |
170 V(Int, LessThanOrEqual) | 171 V(Int, LessThanOrEqual) \ |
| 172 V(Uint, LessThan) |
171 #define PSEUDO_OP(Prefix, Suffix) \ | 173 #define PSEUDO_OP(Prefix, Suffix) \ |
172 const Operator* Prefix##Suffix() { \ | 174 const Operator* Prefix##Suffix() { \ |
173 return Is32() ? Prefix##32##Suffix() : Prefix##64##Suffix(); \ | 175 return Is32() ? Prefix##32##Suffix() : Prefix##64##Suffix(); \ |
174 } | 176 } |
175 PSEUDO_OP_LIST(PSEUDO_OP) | 177 PSEUDO_OP_LIST(PSEUDO_OP) |
176 #undef PSEUDO_OP | 178 #undef PSEUDO_OP |
177 #undef PSEUDO_OP_LIST | 179 #undef PSEUDO_OP_LIST |
178 | 180 |
179 private: | 181 private: |
180 const MachineOperatorBuilderImpl& impl_; | 182 const MachineOperatorBuilderImpl& impl_; |
181 const MachineType word_; | 183 const MachineType word_; |
182 }; | 184 }; |
183 | 185 |
184 } // namespace compiler | 186 } // namespace compiler |
185 } // namespace internal | 187 } // namespace internal |
186 } // namespace v8 | 188 } // namespace v8 |
187 | 189 |
188 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 190 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
OLD | NEW |