OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/compiler/machine-operator.h" | 5 #include "src/compiler/machine-operator.h" |
6 | 6 |
7 #include "src/base/lazy-instance.h" | 7 #include "src/base/lazy-instance.h" |
8 #include "src/compiler/opcodes.h" | 8 #include "src/compiler/opcodes.h" |
9 #include "src/compiler/operator.h" | 9 #include "src/compiler/operator.h" |
10 | 10 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 V(BitcastFloat32ToInt32, Operator::kNoProperties, 1, 0, 1) \ | 156 V(BitcastFloat32ToInt32, Operator::kNoProperties, 1, 0, 1) \ |
157 V(BitcastFloat64ToInt64, Operator::kNoProperties, 1, 0, 1) \ | 157 V(BitcastFloat64ToInt64, Operator::kNoProperties, 1, 0, 1) \ |
158 V(BitcastInt32ToFloat32, Operator::kNoProperties, 1, 0, 1) \ | 158 V(BitcastInt32ToFloat32, Operator::kNoProperties, 1, 0, 1) \ |
159 V(BitcastInt64ToFloat64, Operator::kNoProperties, 1, 0, 1) \ | 159 V(BitcastInt64ToFloat64, Operator::kNoProperties, 1, 0, 1) \ |
160 V(Float32Abs, Operator::kNoProperties, 1, 0, 1) \ | 160 V(Float32Abs, Operator::kNoProperties, 1, 0, 1) \ |
161 V(Float32Add, Operator::kCommutative, 2, 0, 1) \ | 161 V(Float32Add, Operator::kCommutative, 2, 0, 1) \ |
162 V(Float32Sub, Operator::kNoProperties, 2, 0, 1) \ | 162 V(Float32Sub, Operator::kNoProperties, 2, 0, 1) \ |
163 V(Float32SubPreserveNan, Operator::kNoProperties, 2, 0, 1) \ | 163 V(Float32SubPreserveNan, Operator::kNoProperties, 2, 0, 1) \ |
164 V(Float32Mul, Operator::kCommutative, 2, 0, 1) \ | 164 V(Float32Mul, Operator::kCommutative, 2, 0, 1) \ |
165 V(Float32Div, Operator::kNoProperties, 2, 0, 1) \ | 165 V(Float32Div, Operator::kNoProperties, 2, 0, 1) \ |
| 166 V(Float32Neg, Operator::kNoProperties, 1, 0, 1) \ |
166 V(Float32Sqrt, Operator::kNoProperties, 1, 0, 1) \ | 167 V(Float32Sqrt, Operator::kNoProperties, 1, 0, 1) \ |
167 V(Float64Abs, Operator::kNoProperties, 1, 0, 1) \ | 168 V(Float64Abs, Operator::kNoProperties, 1, 0, 1) \ |
168 V(Float64Acos, Operator::kNoProperties, 1, 0, 1) \ | 169 V(Float64Acos, Operator::kNoProperties, 1, 0, 1) \ |
169 V(Float64Acosh, Operator::kNoProperties, 1, 0, 1) \ | 170 V(Float64Acosh, Operator::kNoProperties, 1, 0, 1) \ |
170 V(Float64Asin, Operator::kNoProperties, 1, 0, 1) \ | 171 V(Float64Asin, Operator::kNoProperties, 1, 0, 1) \ |
171 V(Float64Asinh, Operator::kNoProperties, 1, 0, 1) \ | 172 V(Float64Asinh, Operator::kNoProperties, 1, 0, 1) \ |
172 V(Float64Atan, Operator::kNoProperties, 1, 0, 1) \ | 173 V(Float64Atan, Operator::kNoProperties, 1, 0, 1) \ |
173 V(Float64Atan2, Operator::kNoProperties, 2, 0, 1) \ | 174 V(Float64Atan2, Operator::kNoProperties, 2, 0, 1) \ |
174 V(Float64Atanh, Operator::kNoProperties, 1, 0, 1) \ | 175 V(Float64Atanh, Operator::kNoProperties, 1, 0, 1) \ |
175 V(Float64Cbrt, Operator::kNoProperties, 1, 0, 1) \ | 176 V(Float64Cbrt, Operator::kNoProperties, 1, 0, 1) \ |
176 V(Float64Cos, Operator::kNoProperties, 1, 0, 1) \ | 177 V(Float64Cos, Operator::kNoProperties, 1, 0, 1) \ |
177 V(Float64Cosh, Operator::kNoProperties, 1, 0, 1) \ | 178 V(Float64Cosh, Operator::kNoProperties, 1, 0, 1) \ |
178 V(Float64Exp, Operator::kNoProperties, 1, 0, 1) \ | 179 V(Float64Exp, Operator::kNoProperties, 1, 0, 1) \ |
179 V(Float64Expm1, Operator::kNoProperties, 1, 0, 1) \ | 180 V(Float64Expm1, Operator::kNoProperties, 1, 0, 1) \ |
180 V(Float64Log, Operator::kNoProperties, 1, 0, 1) \ | 181 V(Float64Log, Operator::kNoProperties, 1, 0, 1) \ |
181 V(Float64Log1p, Operator::kNoProperties, 1, 0, 1) \ | 182 V(Float64Log1p, Operator::kNoProperties, 1, 0, 1) \ |
182 V(Float64Log2, Operator::kNoProperties, 1, 0, 1) \ | 183 V(Float64Log2, Operator::kNoProperties, 1, 0, 1) \ |
183 V(Float64Log10, Operator::kNoProperties, 1, 0, 1) \ | 184 V(Float64Log10, Operator::kNoProperties, 1, 0, 1) \ |
184 V(Float64Max, Operator::kNoProperties, 2, 0, 1) \ | 185 V(Float64Max, Operator::kNoProperties, 2, 0, 1) \ |
185 V(Float64Min, Operator::kNoProperties, 2, 0, 1) \ | 186 V(Float64Min, Operator::kNoProperties, 2, 0, 1) \ |
| 187 V(Float64Neg, Operator::kNoProperties, 1, 0, 1) \ |
186 V(Float64Add, Operator::kCommutative, 2, 0, 1) \ | 188 V(Float64Add, Operator::kCommutative, 2, 0, 1) \ |
187 V(Float64Sub, Operator::kNoProperties, 2, 0, 1) \ | 189 V(Float64Sub, Operator::kNoProperties, 2, 0, 1) \ |
188 V(Float64SubPreserveNan, Operator::kNoProperties, 2, 0, 1) \ | 190 V(Float64SubPreserveNan, Operator::kNoProperties, 2, 0, 1) \ |
189 V(Float64Mul, Operator::kCommutative, 2, 0, 1) \ | 191 V(Float64Mul, Operator::kCommutative, 2, 0, 1) \ |
190 V(Float64Div, Operator::kNoProperties, 2, 0, 1) \ | 192 V(Float64Div, Operator::kNoProperties, 2, 0, 1) \ |
191 V(Float64Mod, Operator::kNoProperties, 2, 0, 1) \ | 193 V(Float64Mod, Operator::kNoProperties, 2, 0, 1) \ |
192 V(Float64Pow, Operator::kNoProperties, 2, 0, 1) \ | 194 V(Float64Pow, Operator::kNoProperties, 2, 0, 1) \ |
193 V(Float64Sin, Operator::kNoProperties, 1, 0, 1) \ | 195 V(Float64Sin, Operator::kNoProperties, 1, 0, 1) \ |
194 V(Float64Sinh, Operator::kNoProperties, 1, 0, 1) \ | 196 V(Float64Sinh, Operator::kNoProperties, 1, 0, 1) \ |
195 V(Float64Sqrt, Operator::kNoProperties, 1, 0, 1) \ | 197 V(Float64Sqrt, Operator::kNoProperties, 1, 0, 1) \ |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 V(Word32Popcnt, Operator::kNoProperties, 1, 0, 1) \ | 399 V(Word32Popcnt, Operator::kNoProperties, 1, 0, 1) \ |
398 V(Word64Popcnt, Operator::kNoProperties, 1, 0, 1) \ | 400 V(Word64Popcnt, Operator::kNoProperties, 1, 0, 1) \ |
399 V(Float32RoundDown, Operator::kNoProperties, 1, 0, 1) \ | 401 V(Float32RoundDown, Operator::kNoProperties, 1, 0, 1) \ |
400 V(Float64RoundDown, Operator::kNoProperties, 1, 0, 1) \ | 402 V(Float64RoundDown, Operator::kNoProperties, 1, 0, 1) \ |
401 V(Float32RoundUp, Operator::kNoProperties, 1, 0, 1) \ | 403 V(Float32RoundUp, Operator::kNoProperties, 1, 0, 1) \ |
402 V(Float64RoundUp, Operator::kNoProperties, 1, 0, 1) \ | 404 V(Float64RoundUp, Operator::kNoProperties, 1, 0, 1) \ |
403 V(Float32RoundTruncate, Operator::kNoProperties, 1, 0, 1) \ | 405 V(Float32RoundTruncate, Operator::kNoProperties, 1, 0, 1) \ |
404 V(Float64RoundTruncate, Operator::kNoProperties, 1, 0, 1) \ | 406 V(Float64RoundTruncate, Operator::kNoProperties, 1, 0, 1) \ |
405 V(Float64RoundTiesAway, Operator::kNoProperties, 1, 0, 1) \ | 407 V(Float64RoundTiesAway, Operator::kNoProperties, 1, 0, 1) \ |
406 V(Float32RoundTiesEven, Operator::kNoProperties, 1, 0, 1) \ | 408 V(Float32RoundTiesEven, Operator::kNoProperties, 1, 0, 1) \ |
407 V(Float64RoundTiesEven, Operator::kNoProperties, 1, 0, 1) \ | 409 V(Float64RoundTiesEven, Operator::kNoProperties, 1, 0, 1) |
408 V(Float32Neg, Operator::kNoProperties, 1, 0, 1) \ | |
409 V(Float64Neg, Operator::kNoProperties, 1, 0, 1) | |
410 | 410 |
411 #define OVERFLOW_OP_LIST(V) \ | 411 #define OVERFLOW_OP_LIST(V) \ |
412 V(Int32AddWithOverflow, Operator::kAssociative | Operator::kCommutative) \ | 412 V(Int32AddWithOverflow, Operator::kAssociative | Operator::kCommutative) \ |
413 V(Int32SubWithOverflow, Operator::kNoProperties) \ | 413 V(Int32SubWithOverflow, Operator::kNoProperties) \ |
414 V(Int32MulWithOverflow, Operator::kAssociative | Operator::kCommutative) \ | 414 V(Int32MulWithOverflow, Operator::kAssociative | Operator::kCommutative) \ |
415 V(Int64AddWithOverflow, Operator::kAssociative | Operator::kCommutative) \ | 415 V(Int64AddWithOverflow, Operator::kAssociative | Operator::kCommutative) \ |
416 V(Int64SubWithOverflow, Operator::kNoProperties) | 416 V(Int64SubWithOverflow, Operator::kNoProperties) |
417 | 417 |
418 #define MACHINE_TYPE_LIST(V) \ | 418 #define MACHINE_TYPE_LIST(V) \ |
419 V(Float32) \ | 419 V(Float32) \ |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 } | 794 } |
795 ATOMIC_REPRESENTATION_LIST(STORE) | 795 ATOMIC_REPRESENTATION_LIST(STORE) |
796 #undef STORE | 796 #undef STORE |
797 UNREACHABLE(); | 797 UNREACHABLE(); |
798 return nullptr; | 798 return nullptr; |
799 } | 799 } |
800 | 800 |
801 } // namespace compiler | 801 } // namespace compiler |
802 } // namespace internal | 802 } // namespace internal |
803 } // namespace v8 | 803 } // namespace v8 |
OLD | NEW |