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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 ASSERT_EQ(1U, s.size()); | 117 ASSERT_EQ(1U, s.size()); |
118 EXPECT_EQ(memacc.load_opcode, s[0]->arch_opcode()); | 118 EXPECT_EQ(memacc.load_opcode, s[0]->arch_opcode()); |
119 EXPECT_EQ(2U, s[0]->InputCount()); | 119 EXPECT_EQ(2U, s[0]->InputCount()); |
120 EXPECT_EQ(1U, s[0]->OutputCount()); | 120 EXPECT_EQ(1U, s[0]->OutputCount()); |
121 } | 121 } |
122 | 122 |
123 | 123 |
124 TEST_P(InstructionSelectorMemoryAccessTest, StoreWithParameters) { | 124 TEST_P(InstructionSelectorMemoryAccessTest, StoreWithParameters) { |
125 const MemoryAccess memacc = GetParam(); | 125 const MemoryAccess memacc = GetParam(); |
126 StreamBuilder m(this, kMachInt32, kMachPtr, kMachInt32, memacc.type); | 126 StreamBuilder m(this, kMachInt32, kMachPtr, kMachInt32, memacc.type); |
127 m.Store(memacc.type, m.Parameter(0), m.Parameter(1), m.Parameter(2)); | 127 StoreRepresentation store_rep(memacc.type, kNoWriteBarrier); |
| 128 m.Store(store_rep, m.Parameter(0), m.Parameter(1), m.Parameter(2)); |
128 m.Return(m.Int32Constant(0)); | 129 m.Return(m.Int32Constant(0)); |
129 Stream s = m.Build(); | 130 Stream s = m.Build(); |
130 ASSERT_EQ(1U, s.size()); | 131 ASSERT_EQ(1U, s.size()); |
131 EXPECT_EQ(memacc.store_opcode, s[0]->arch_opcode()); | 132 EXPECT_EQ(memacc.store_opcode, s[0]->arch_opcode()); |
132 EXPECT_EQ(3U, s[0]->InputCount()); | 133 EXPECT_EQ(3U, s[0]->InputCount()); |
133 EXPECT_EQ(0U, s[0]->OutputCount()); | 134 EXPECT_EQ(0U, s[0]->OutputCount()); |
134 } | 135 } |
135 | 136 |
136 | 137 |
137 INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, | 138 INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, |
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1289 EXPECT_EQ(kX64Lzcnt32, s[0]->arch_opcode()); | 1290 EXPECT_EQ(kX64Lzcnt32, s[0]->arch_opcode()); |
1290 ASSERT_EQ(1U, s[0]->InputCount()); | 1291 ASSERT_EQ(1U, s[0]->InputCount()); |
1291 EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0))); | 1292 EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0))); |
1292 ASSERT_EQ(1U, s[0]->OutputCount()); | 1293 ASSERT_EQ(1U, s[0]->OutputCount()); |
1293 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output())); | 1294 EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output())); |
1294 } | 1295 } |
1295 | 1296 |
1296 } // namespace compiler | 1297 } // namespace compiler |
1297 } // namespace internal | 1298 } // namespace internal |
1298 } // namespace v8 | 1299 } // namespace v8 |
OLD | NEW |