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 "test/unittests/compiler/instruction-selector-unittest.h" | 5 #include "test/unittests/compiler/instruction-selector-unittest.h" |
6 | 6 |
7 namespace v8 { | 7 namespace v8 { |
8 namespace internal { | 8 namespace internal { |
9 namespace compiler { | 9 namespace compiler { |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 return os << shift.mi; | 40 return os << shift.mi; |
41 } | 41 } |
42 | 42 |
43 | 43 |
44 // Helper to build Int32Constant or Int64Constant depending on the given | 44 // Helper to build Int32Constant or Int64Constant depending on the given |
45 // machine type. | 45 // machine type. |
46 Node* BuildConstant(InstructionSelectorTest::StreamBuilder& m, MachineType type, | 46 Node* BuildConstant(InstructionSelectorTest::StreamBuilder& m, MachineType type, |
47 int64_t value) { | 47 int64_t value) { |
48 switch (type) { | 48 switch (type) { |
49 case kMachInt32: | 49 case kMachInt32: |
50 return m.Int32Constant(value); | 50 return m.Int32Constant(static_cast<int32_t>(value)); |
51 break; | 51 break; |
52 | 52 |
53 case kMachInt64: | 53 case kMachInt64: |
54 return m.Int64Constant(value); | 54 return m.Int64Constant(value); |
55 break; | 55 break; |
56 | 56 |
57 default: | 57 default: |
58 UNIMPLEMENTED(); | 58 UNIMPLEMENTED(); |
59 } | 59 } |
60 return NULL; | 60 return NULL; |
(...skipping 2423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2484 EXPECT_EQ(kArm64Float64Neg, s[0]->arch_opcode()); | 2484 EXPECT_EQ(kArm64Float64Neg, s[0]->arch_opcode()); |
2485 ASSERT_EQ(1U, s[0]->InputCount()); | 2485 ASSERT_EQ(1U, s[0]->InputCount()); |
2486 EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0))); | 2486 EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0))); |
2487 ASSERT_EQ(1U, s[0]->OutputCount()); | 2487 ASSERT_EQ(1U, s[0]->OutputCount()); |
2488 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output())); | 2488 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output())); |
2489 } | 2489 } |
2490 | 2490 |
2491 } // namespace compiler | 2491 } // namespace compiler |
2492 } // namespace internal | 2492 } // namespace internal |
2493 } // namespace v8 | 2493 } // namespace v8 |
OLD | NEW |