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/compiler-unittests/instruction-selector-unittest.h" | 5 #include "test/compiler-unittests/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 |
11 class InstructionSelectorARMTest : public InstructionSelectorTest {}; | 11 class InstructionSelectorARMTest : public InstructionSelectorTest {}; |
12 | 12 |
13 | 13 |
14 COMPILER_TEST_F(InstructionSelectorARMTest, Int32AddP) { | 14 TARGET_TEST_F(InstructionSelectorARMTest, Int32AddP) { |
15 StreamBuilder m(this, kMachineWord32, kMachineWord32, kMachineWord32); | 15 StreamBuilder m(this, kMachineWord32, kMachineWord32, kMachineWord32); |
16 m.Return(m.Int32Add(m.Parameter(0), m.Parameter(1))); | 16 m.Return(m.Int32Add(m.Parameter(0), m.Parameter(1))); |
17 Stream s = m.Build(); | 17 Stream s = m.Build(); |
18 ASSERT_EQ(1U, s.size()); | 18 ASSERT_EQ(1U, s.size()); |
19 EXPECT_EQ(kArmAdd, s[0]->arch_opcode()); | 19 EXPECT_EQ(kArmAdd, s[0]->arch_opcode()); |
20 EXPECT_EQ(kMode_Operand2_R, s[0]->addressing_mode()); | 20 EXPECT_EQ(kMode_Operand2_R, s[0]->addressing_mode()); |
21 EXPECT_EQ(2U, s[0]->InputCount()); | 21 EXPECT_EQ(2U, s[0]->InputCount()); |
22 EXPECT_EQ(1U, s[0]->OutputCount()); | 22 EXPECT_EQ(1U, s[0]->OutputCount()); |
23 } | 23 } |
24 | 24 |
25 } // namespace compiler | 25 } // namespace compiler |
26 } // namespace internal | 26 } // namespace internal |
27 } // namespace v8 | 27 } // namespace v8 |
OLD | NEW |