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 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 EXPECT_EQ(memacc.load_opcode, s[0]->arch_opcode()); | 119 EXPECT_EQ(memacc.load_opcode, s[0]->arch_opcode()); |
120 EXPECT_EQ(2U, s[0]->InputCount()); | 120 EXPECT_EQ(2U, s[0]->InputCount()); |
121 EXPECT_EQ(1U, s[0]->OutputCount()); | 121 EXPECT_EQ(1U, s[0]->OutputCount()); |
122 } | 122 } |
123 | 123 |
124 | 124 |
125 TEST_P(InstructionSelectorMemoryAccessTest, StoreWithParameters) { | 125 TEST_P(InstructionSelectorMemoryAccessTest, StoreWithParameters) { |
126 const MemoryAccess memacc = GetParam(); | 126 const MemoryAccess memacc = GetParam(); |
127 StreamBuilder m(this, MachineType::Int32(), MachineType::Pointer(), | 127 StreamBuilder m(this, MachineType::Int32(), MachineType::Pointer(), |
128 MachineType::Int32(), memacc.type); | 128 MachineType::Int32(), memacc.type); |
129 m.Store(memacc.type, m.Parameter(0), m.Parameter(1), m.Parameter(2), | 129 m.Store(memacc.type.representation(), m.Parameter(0), m.Parameter(1), |
130 kNoWriteBarrier); | 130 m.Parameter(2), kNoWriteBarrier); |
131 m.Return(m.Int32Constant(0)); | 131 m.Return(m.Int32Constant(0)); |
132 Stream s = m.Build(); | 132 Stream s = m.Build(); |
133 ASSERT_EQ(1U, s.size()); | 133 ASSERT_EQ(1U, s.size()); |
134 EXPECT_EQ(memacc.store_opcode, s[0]->arch_opcode()); | 134 EXPECT_EQ(memacc.store_opcode, s[0]->arch_opcode()); |
135 EXPECT_EQ(3U, s[0]->InputCount()); | 135 EXPECT_EQ(3U, s[0]->InputCount()); |
136 EXPECT_EQ(0U, s[0]->OutputCount()); | 136 EXPECT_EQ(0U, s[0]->OutputCount()); |
137 } | 137 } |
138 | 138 |
139 | 139 |
140 INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, | 140 INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, |
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 EXPECT_EQ(kX64Lzcnt32, s[0]->arch_opcode()); | 1330 EXPECT_EQ(kX64Lzcnt32, s[0]->arch_opcode()); |
1331 ASSERT_EQ(1U, s[0]->InputCount()); | 1331 ASSERT_EQ(1U, s[0]->InputCount()); |
1332 EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0))); | 1332 EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0))); |
1333 ASSERT_EQ(1U, s[0]->OutputCount()); | 1333 ASSERT_EQ(1U, s[0]->OutputCount()); |
1334 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output())); | 1334 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output())); |
1335 } | 1335 } |
1336 | 1336 |
1337 } // namespace compiler | 1337 } // namespace compiler |
1338 } // namespace internal | 1338 } // namespace internal |
1339 } // namespace v8 | 1339 } // namespace v8 |
OLD | NEW |