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

Side by Side Diff: test/cctest/compiler/test-gap-resolver.cc

Issue 2092413002: [RegisterConfiguration] Streamline access to arch defaults, simplify Registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile. Created 4 years, 5 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
« no previous file with comments | « src/x87/deoptimizer-x87.cc ('k') | test/cctest/compiler/test-multiple-return.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/gap-resolver.h" 5 #include "src/compiler/gap-resolver.h"
6 6
7 #include "src/base/utils/random-number-generator.h" 7 #include "src/base/utils/random-number-generator.h"
8 #include "test/cctest/cctest.h" 8 #include "test/cctest/cctest.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 110
111 friend std::ostream& operator<<(std::ostream& os, 111 friend std::ostream& operator<<(std::ostream& os,
112 const InterpreterState& is) { 112 const InterpreterState& is) {
113 for (OperandMap::const_iterator it = is.values_.begin(); 113 for (OperandMap::const_iterator it = is.values_.begin();
114 it != is.values_.end(); ++it) { 114 it != is.values_.end(); ++it) {
115 if (it != is.values_.begin()) os << " "; 115 if (it != is.values_.begin()) os << " ";
116 InstructionOperand source = FromKey(it->first); 116 InstructionOperand source = FromKey(it->first);
117 InstructionOperand destination = FromKey(it->second); 117 InstructionOperand destination = FromKey(it->second);
118 MoveOperands mo(source, destination); 118 MoveOperands mo(source, destination);
119 PrintableMoveOperands pmo = { 119 PrintableMoveOperands pmo = {RegisterConfiguration::Turbofan(), &mo};
120 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN),
121 &mo};
122 os << pmo; 120 os << pmo;
123 } 121 }
124 return os; 122 return os;
125 } 123 }
126 124
127 OperandMap values_; 125 OperandMap values_;
128 }; 126 };
129 127
130 128
131 // An abstract interpreter for moves, swaps and parallel moves. 129 // An abstract interpreter for moves, swaps and parallel moves.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 return MachineRepresentation::kFloat64; 191 return MachineRepresentation::kFloat64;
194 case 4: 192 case 4:
195 return MachineRepresentation::kTagged; 193 return MachineRepresentation::kTagged;
196 } 194 }
197 UNREACHABLE(); 195 UNREACHABLE();
198 return MachineRepresentation::kNone; 196 return MachineRepresentation::kNone;
199 } 197 }
200 198
201 InstructionOperand CreateRandomOperand(bool is_source, 199 InstructionOperand CreateRandomOperand(bool is_source,
202 MachineRepresentation rep) { 200 MachineRepresentation rep) {
203 auto conf = 201 auto conf = RegisterConfiguration::Turbofan();
204 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN);
205 auto GetRegisterCode = [&conf](MachineRepresentation rep, int index) { 202 auto GetRegisterCode = [&conf](MachineRepresentation rep, int index) {
206 switch (rep) { 203 switch (rep) {
207 case MachineRepresentation::kFloat32: 204 case MachineRepresentation::kFloat32:
208 case MachineRepresentation::kFloat64: 205 case MachineRepresentation::kFloat64:
209 return conf->RegisterConfiguration::GetAllocatableDoubleCode(index); 206 return conf->RegisterConfiguration::GetAllocatableDoubleCode(index);
210 break; 207 break;
211 208
212 default: 209 default:
213 return conf->RegisterConfiguration::GetAllocatableGeneralCode(index); 210 return conf->RegisterConfiguration::GetAllocatableGeneralCode(index);
214 break; 211 break;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 resolver.Resolve(pm); 253 resolver.Resolve(pm);
257 254
258 CHECK(mi1.state() == mi2.state()); 255 CHECK(mi1.state() == mi2.state());
259 } 256 }
260 } 257 }
261 } 258 }
262 259
263 } // namespace compiler 260 } // namespace compiler
264 } // namespace internal 261 } // namespace internal
265 } // namespace v8 262 } // namespace v8
OLDNEW
« no previous file with comments | « src/x87/deoptimizer-x87.cc ('k') | test/cctest/compiler/test-multiple-return.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698