Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Side by Side Diff: test/unittests/compiler/register-allocator-unittest.cc

Issue 2433093002: MIPS: Fix bad RegisterConfiguration usage in InstructionSequence unit tests. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "src/compiler/pipeline.h" 5 #include "src/compiler/pipeline.h"
6 #include "test/unittests/compiler/instruction-sequence-unittest.h" 6 #include "test/unittests/compiler/instruction-sequence-unittest.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 Allocate(); 314 Allocate();
315 } 315 }
316 316
317 317
318 TEST_F(RegisterAllocatorTest, SpillPhi) { 318 TEST_F(RegisterAllocatorTest, SpillPhi) {
319 StartBlock(); 319 StartBlock();
320 EndBlock(Branch(Imm(), 1, 2)); 320 EndBlock(Branch(Imm(), 1, 2));
321 321
322 StartBlock(); 322 StartBlock();
323 auto left = Define(Reg(0)); 323 auto left = Define(Reg(GetAllocatableCode(0)));
ivica.bogosavljevic 2016/10/19 14:30:40 I guess the same thing should be done everywhere.
324 EndBlock(Jump(2)); 324 EndBlock(Jump(2));
325 325
326 StartBlock(); 326 StartBlock();
327 auto right = Define(Reg(0)); 327 auto right = Define(Reg(GetAllocatableCode(0)));
328 EndBlock(); 328 EndBlock();
329 329
330 StartBlock(); 330 StartBlock();
331 auto phi = Phi(left, right); 331 auto phi = Phi(left, right);
332 EmitCall(Slot(-1)); 332 EmitCall(Slot(-1));
333 Return(Reg(phi)); 333 Return(Reg(phi));
334 EndBlock(); 334 EndBlock();
335 335
336 Allocate(); 336 Allocate();
337 } 337 }
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 INSTANTIATE_TEST_CASE_P( 788 INSTANTIATE_TEST_CASE_P(
789 RegisterAllocatorTest, SlotConstraintTest, 789 RegisterAllocatorTest, SlotConstraintTest,
790 ::testing::Combine(::testing::ValuesIn(kParameterTypes), 790 ::testing::Combine(::testing::ValuesIn(kParameterTypes),
791 ::testing::Range(0, SlotConstraintTest::kMaxVariant))); 791 ::testing::Range(0, SlotConstraintTest::kMaxVariant)));
792 792
793 #endif // GTEST_HAS_COMBINE 793 #endif // GTEST_HAS_COMBINE
794 794
795 } // namespace compiler 795 } // namespace compiler
796 } // namespace internal 796 } // namespace internal
797 } // namespace v8 797 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698