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 #include "src/compiler/opcodes.h" | 6 #include "src/compiler/opcodes.h" |
7 #include "src/compiler/operator.h" | 7 #include "src/compiler/operator.h" |
8 #include "src/compiler/operator-properties.h" | 8 #include "src/compiler/operator-properties.h" |
9 #include "test/unittests/test-utils.h" | 9 #include "test/unittests/test-utils.h" |
10 | 10 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 PURE(Float32Equal, 2, 0, 1), // -- | 247 PURE(Float32Equal, 2, 0, 1), // -- |
248 PURE(Float32LessThan, 2, 0, 1), // -- | 248 PURE(Float32LessThan, 2, 0, 1), // -- |
249 PURE(Float32LessThanOrEqual, 2, 0, 1), // -- | 249 PURE(Float32LessThanOrEqual, 2, 0, 1), // -- |
250 PURE(Float64Abs, 1, 0, 1), // -- | 250 PURE(Float64Abs, 1, 0, 1), // -- |
251 PURE(Float64Add, 2, 0, 1), // -- | 251 PURE(Float64Add, 2, 0, 1), // -- |
252 PURE(Float64Sub, 2, 0, 1), // -- | 252 PURE(Float64Sub, 2, 0, 1), // -- |
253 PURE(Float64Mul, 2, 0, 1), // -- | 253 PURE(Float64Mul, 2, 0, 1), // -- |
254 PURE(Float64Div, 2, 0, 1), // -- | 254 PURE(Float64Div, 2, 0, 1), // -- |
255 PURE(Float64Mod, 2, 0, 1), // -- | 255 PURE(Float64Mod, 2, 0, 1), // -- |
256 PURE(Float64Sqrt, 1, 0, 1), // -- | 256 PURE(Float64Sqrt, 1, 0, 1), // -- |
| 257 PURE(Float64Max, 2, 0, 1), // -- |
| 258 PURE(Float64Min, 2, 0, 1), // -- |
257 PURE(Float64Equal, 2, 0, 1), // -- | 259 PURE(Float64Equal, 2, 0, 1), // -- |
258 PURE(Float64LessThan, 2, 0, 1), // -- | 260 PURE(Float64LessThan, 2, 0, 1), // -- |
259 PURE(Float64LessThanOrEqual, 2, 0, 1), // -- | 261 PURE(Float64LessThanOrEqual, 2, 0, 1), // -- |
260 PURE(LoadStackPointer, 0, 0, 1), // -- | 262 PURE(LoadStackPointer, 0, 0, 1), // -- |
261 PURE(Float64ExtractLowWord32, 1, 0, 1), // -- | 263 PURE(Float64ExtractLowWord32, 1, 0, 1), // -- |
262 PURE(Float64ExtractHighWord32, 1, 0, 1), // -- | 264 PURE(Float64ExtractHighWord32, 1, 0, 1), // -- |
263 PURE(Float64InsertLowWord32, 2, 0, 1), // -- | 265 PURE(Float64InsertLowWord32, 2, 0, 1), // -- |
264 PURE(Float64InsertHighWord32, 2, 0, 1), // -- | 266 PURE(Float64InsertHighWord32, 2, 0, 1), // -- |
265 #undef PURE | 267 #undef PURE |
266 }; | 268 }; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 return os << pop.constructor_name; | 313 return os << pop.constructor_name; |
312 } | 314 } |
313 | 315 |
314 const OptionalOperatorEntry kOptionalOperators[] = { | 316 const OptionalOperatorEntry kOptionalOperators[] = { |
315 #define OPTIONAL_ENTRY(Name, value_input_count, control_input_count, \ | 317 #define OPTIONAL_ENTRY(Name, value_input_count, control_input_count, \ |
316 value_output_count) \ | 318 value_output_count) \ |
317 { \ | 319 { \ |
318 &MachineOperatorBuilder::Name, MachineOperatorBuilder::k##Name, #Name, \ | 320 &MachineOperatorBuilder::Name, MachineOperatorBuilder::k##Name, #Name, \ |
319 value_input_count, control_input_count, value_output_count \ | 321 value_input_count, control_input_count, value_output_count \ |
320 } | 322 } |
321 OPTIONAL_ENTRY(Float32Max, 2, 0, 1), // -- | |
322 OPTIONAL_ENTRY(Float32Min, 2, 0, 1), // -- | |
323 OPTIONAL_ENTRY(Float64Max, 2, 0, 1), // -- | |
324 OPTIONAL_ENTRY(Float64Min, 2, 0, 1), // -- | |
325 OPTIONAL_ENTRY(Float64RoundDown, 1, 0, 1), // -- | 323 OPTIONAL_ENTRY(Float64RoundDown, 1, 0, 1), // -- |
326 OPTIONAL_ENTRY(Float64RoundTruncate, 1, 0, 1), // -- | 324 OPTIONAL_ENTRY(Float64RoundTruncate, 1, 0, 1), // -- |
327 OPTIONAL_ENTRY(Float64RoundTiesAway, 1, 0, 1), // -- | 325 OPTIONAL_ENTRY(Float64RoundTiesAway, 1, 0, 1), // -- |
328 OPTIONAL_ENTRY(Float32Neg, 1, 0, 1), // -- | 326 OPTIONAL_ENTRY(Float32Neg, 1, 0, 1), // -- |
329 OPTIONAL_ENTRY(Float64Neg, 1, 0, 1), // -- | 327 OPTIONAL_ENTRY(Float64Neg, 1, 0, 1), // -- |
330 #undef OPTIONAL_ENTRY | 328 #undef OPTIONAL_ENTRY |
331 }; | 329 }; |
332 } // namespace | 330 } // namespace |
333 | 331 |
334 | 332 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 EXPECT_EQ(machine.Uint64Div(), machine.UintDiv()); | 411 EXPECT_EQ(machine.Uint64Div(), machine.UintDiv()); |
414 EXPECT_EQ(machine.Int64Mod(), machine.IntMod()); | 412 EXPECT_EQ(machine.Int64Mod(), machine.IntMod()); |
415 EXPECT_EQ(machine.Uint64Mod(), machine.UintMod()); | 413 EXPECT_EQ(machine.Uint64Mod(), machine.UintMod()); |
416 EXPECT_EQ(machine.Int64LessThan(), machine.IntLessThan()); | 414 EXPECT_EQ(machine.Int64LessThan(), machine.IntLessThan()); |
417 EXPECT_EQ(machine.Int64LessThanOrEqual(), machine.IntLessThanOrEqual()); | 415 EXPECT_EQ(machine.Int64LessThanOrEqual(), machine.IntLessThanOrEqual()); |
418 } | 416 } |
419 | 417 |
420 } // namespace compiler | 418 } // namespace compiler |
421 } // namespace internal | 419 } // namespace internal |
422 } // namespace v8 | 420 } // namespace v8 |
OLD | NEW |