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

Side by Side Diff: src/x64/code-stubs-x64.h

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/x64/assembler-x64.h ('k') | src/x64/deoptimizer-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 #ifndef V8_X64_CODE_STUBS_X64_H_ 5 #ifndef V8_X64_CODE_STUBS_X64_H_
6 #define V8_X64_CODE_STUBS_X64_H_ 6 #define V8_X64_CODE_STUBS_X64_H_
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 10
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 Register object_; 288 Register object_;
289 Register address_; 289 Register address_;
290 Register scratch0_; 290 Register scratch0_;
291 Register scratch1_; 291 Register scratch1_;
292 // Third scratch register is always rcx. 292 // Third scratch register is always rcx.
293 293
294 Register GetRegThatIsNotRcxOr(Register r1, 294 Register GetRegThatIsNotRcxOr(Register r1,
295 Register r2, 295 Register r2,
296 Register r3) { 296 Register r3) {
297 for (int i = 0; i < Register::kNumRegisters; i++) { 297 for (int i = 0; i < Register::kNumRegisters; i++) {
298 Register candidate = Register::from_code(i); 298 if (RegisterConfiguration::Crankshaft()->IsAllocatableGeneralCode(i)) {
299 if (candidate.IsAllocatable()) { 299 Register candidate = Register::from_code(i);
300 if (candidate.is(rcx)) continue; 300 if (candidate.is(rcx)) continue;
301 if (candidate.is(r1)) continue; 301 if (candidate.is(r1)) continue;
302 if (candidate.is(r2)) continue; 302 if (candidate.is(r2)) continue;
303 if (candidate.is(r3)) continue; 303 if (candidate.is(r3)) continue;
304 return candidate; 304 return candidate;
305 } 305 }
306 } 306 }
307 UNREACHABLE(); 307 UNREACHABLE();
308 return no_reg; 308 return no_reg;
309 } 309 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 RegisterAllocation regs_; 359 RegisterAllocation regs_;
360 360
361 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); 361 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub);
362 }; 362 };
363 363
364 364
365 } // namespace internal 365 } // namespace internal
366 } // namespace v8 366 } // namespace v8
367 367
368 #endif // V8_X64_CODE_STUBS_X64_H_ 368 #endif // V8_X64_CODE_STUBS_X64_H_
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/deoptimizer-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698