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

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

Issue 2410673002: [Turbofan] Add concept of FP register aliasing on ARM 32. (Closed)
Patch Set: Add a TODO. Created 4 years, 1 month 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 StartBlock(); 94 StartBlock();
95 auto a_reg = Parameter(); 95 auto a_reg = Parameter();
96 auto b_reg = Parameter(); 96 auto b_reg = Parameter();
97 auto c_reg = EmitOI(Reg(1), Reg(a_reg, 1), Reg(b_reg, 0)); 97 auto c_reg = EmitOI(Reg(1), Reg(a_reg, 1), Reg(b_reg, 0));
98 Return(c_reg); 98 Return(c_reg);
99 EndBlock(Last()); 99 EndBlock(Last());
100 100
101 Allocate(); 101 Allocate();
102 } 102 }
103 103
104 TEST_F(RegisterAllocatorTest, CanAllocateThreeFPRegisters) { 104 TEST_F(RegisterAllocatorTest, CanAllocateFPRegisters) {
105 // return p0 + p1;
106 StartBlock(); 105 StartBlock();
107 VReg a_reg = FPParameter(); 106 TestOperand inputs[] = {
108 VReg b_reg = FPParameter(); 107 Reg(FPParameter(kFloat64)), Reg(FPParameter(kFloat64)),
109 VReg c_reg = EmitOI(FPReg(1), Reg(a_reg, 1), Reg(b_reg, 0)); 108 Reg(FPParameter(kFloat32)), Reg(FPParameter(kFloat32)),
110 Return(c_reg); 109 Reg(FPParameter(kSimd128)), Reg(FPParameter(kSimd128))};
110 VReg out1 = EmitOI(FPReg(1, kFloat64), arraysize(inputs), inputs);
111 Return(out1);
111 EndBlock(Last()); 112 EndBlock(Last());
112 113
113 Allocate(); 114 Allocate();
114 } 115 }
115 116
116 TEST_F(RegisterAllocatorTest, SimpleLoop) { 117 TEST_F(RegisterAllocatorTest, SimpleLoop) {
117 // i = K; 118 // i = K;
118 // while(true) { i++ } 119 // while(true) { i++ }
119 StartBlock(); 120 StartBlock();
120 auto i_reg = DefineConstant(); 121 auto i_reg = DefineConstant();
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 INSTANTIATE_TEST_CASE_P( 789 INSTANTIATE_TEST_CASE_P(
789 RegisterAllocatorTest, SlotConstraintTest, 790 RegisterAllocatorTest, SlotConstraintTest,
790 ::testing::Combine(::testing::ValuesIn(kParameterTypes), 791 ::testing::Combine(::testing::ValuesIn(kParameterTypes),
791 ::testing::Range(0, SlotConstraintTest::kMaxVariant))); 792 ::testing::Range(0, SlotConstraintTest::kMaxVariant)));
792 793
793 #endif // GTEST_HAS_COMBINE 794 #endif // GTEST_HAS_COMBINE
794 795
795 } // namespace compiler 796 } // namespace compiler
796 } // namespace internal 797 } // namespace internal
797 } // namespace v8 798 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/move-optimizer-unittest.cc ('k') | test/unittests/register-configuration-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698