| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/int64-lowering.h" | 5 #include "src/compiler/int64-lowering.h" |
| 6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
| 7 #include "src/compiler/linkage.h" | 7 #include "src/compiler/linkage.h" |
| 8 #include "src/compiler/machine-operator.h" | 8 #include "src/compiler/machine-operator.h" |
| 9 #include "src/compiler/node.h" | 9 #include "src/compiler/node.h" |
| 10 | 10 |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 Int64Constant(value(1))), | 349 Int64Constant(value(1))), |
| 350 MachineRepresentation::kWord64); | 350 MachineRepresentation::kWord64); |
| 351 EXPECT_THAT(graph()->end()->InputAt(1), | 351 EXPECT_THAT(graph()->end()->InputAt(1), |
| 352 IsReturn2(IsWord32Xor(IsInt32Constant(low_word_value(0)), | 352 IsReturn2(IsWord32Xor(IsInt32Constant(low_word_value(0)), |
| 353 IsInt32Constant(low_word_value(1))), | 353 IsInt32Constant(low_word_value(1))), |
| 354 IsWord32Xor(IsInt32Constant(high_word_value(0)), | 354 IsWord32Xor(IsInt32Constant(high_word_value(0)), |
| 355 IsInt32Constant(high_word_value(1))), | 355 IsInt32Constant(high_word_value(1))), |
| 356 start(), start())); | 356 start(), start())); |
| 357 } | 357 } |
| 358 // kExprI64Shl: | 358 // kExprI64Shl: |
| 359 TEST_F(Int64LoweringTest, Int64Shl) { |
| 360 if (4 != kPointerSize) return; |
| 361 |
| 362 LowerGraph(graph()->NewNode(machine()->Word64Shl(), Int64Constant(value(0)), |
| 363 Int64Constant(value(1))), |
| 364 MachineRepresentation::kWord64); |
| 365 |
| 366 Capture<Node*> shl; |
| 367 Matcher<Node*> shl_matcher = IsWasmWord64Shl( |
| 368 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)), |
| 369 IsInt32Constant(low_word_value(1))); |
| 370 |
| 371 EXPECT_THAT(graph()->end()->InputAt(1), |
| 372 IsReturn2(IsProjection(0, AllOf(CaptureEq(&shl), shl_matcher)), |
| 373 IsProjection(1, AllOf(CaptureEq(&shl), shl_matcher)), |
| 374 start(), start())); |
| 375 } |
| 359 // kExprI64ShrU: | 376 // kExprI64ShrU: |
| 360 // kExprI64ShrS: | 377 // kExprI64ShrS: |
| 361 // kExprI64Eq: | 378 // kExprI64Eq: |
| 362 TEST_F(Int64LoweringTest, Int64Eq) { | 379 TEST_F(Int64LoweringTest, Int64Eq) { |
| 363 if (4 != kPointerSize) return; | 380 if (4 != kPointerSize) return; |
| 364 | 381 |
| 365 LowerGraph(graph()->NewNode(machine()->Word64Equal(), Int64Constant(value(0)), | 382 LowerGraph(graph()->NewNode(machine()->Word64Equal(), Int64Constant(value(0)), |
| 366 Int64Constant(value(1))), | 383 Int64Constant(value(1))), |
| 367 MachineRepresentation::kWord32); | 384 MachineRepresentation::kWord32); |
| 368 EXPECT_THAT( | 385 EXPECT_THAT( |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 // kExprF64SConvertI64: | 434 // kExprF64SConvertI64: |
| 418 // kExprF64UConvertI64: | 435 // kExprF64UConvertI64: |
| 419 // kExprI64SConvertF32: | 436 // kExprI64SConvertF32: |
| 420 // kExprI64SConvertF64: | 437 // kExprI64SConvertF64: |
| 421 // kExprI64UConvertF32: | 438 // kExprI64UConvertF32: |
| 422 // kExprI64UConvertF64: | 439 // kExprI64UConvertF64: |
| 423 | 440 |
| 424 } // namespace compiler | 441 } // namespace compiler |
| 425 } // namespace internal | 442 } // namespace internal |
| 426 } // namespace v8 | 443 } // namespace v8 |
| OLD | NEW |