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

Side by Side Diff: src/ia32/code-stubs-ia32.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/ia32/assembler-ia32.h ('k') | src/ia32/deoptimizer-ia32.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_IA32_CODE_STUBS_IA32_H_ 5 #ifndef V8_IA32_CODE_STUBS_IA32_H_
6 #define V8_IA32_CODE_STUBS_IA32_H_ 6 #define V8_IA32_CODE_STUBS_IA32_H_
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 10
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 Register object_; 294 Register object_;
295 Register address_; 295 Register address_;
296 Register scratch0_; 296 Register scratch0_;
297 Register scratch1_; 297 Register scratch1_;
298 // Third scratch register is always ecx. 298 // Third scratch register is always ecx.
299 299
300 Register GetRegThatIsNotEcxOr(Register r1, 300 Register GetRegThatIsNotEcxOr(Register r1,
301 Register r2, 301 Register r2,
302 Register r3) { 302 Register r3) {
303 for (int i = 0; i < Register::kNumRegisters; i++) { 303 for (int i = 0; i < Register::kNumRegisters; i++) {
304 Register candidate = Register::from_code(i); 304 if (RegisterConfiguration::Crankshaft()->IsAllocatableGeneralCode(i)) {
305 if (candidate.IsAllocatable()) { 305 Register candidate = Register::from_code(i);
306 if (candidate.is(ecx)) continue; 306 if (candidate.is(ecx)) continue;
307 if (candidate.is(r1)) continue; 307 if (candidate.is(r1)) continue;
308 if (candidate.is(r2)) continue; 308 if (candidate.is(r2)) continue;
309 if (candidate.is(r3)) continue; 309 if (candidate.is(r3)) continue;
310 return candidate; 310 return candidate;
311 } 311 }
312 } 312 }
313 UNREACHABLE(); 313 UNREACHABLE();
314 return no_reg; 314 return no_reg;
315 } 315 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 RegisterAllocation regs_; 364 RegisterAllocation regs_;
365 365
366 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); 366 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub);
367 }; 367 };
368 368
369 369
370 } // namespace internal 370 } // namespace internal
371 } // namespace v8 371 } // namespace v8
372 372
373 #endif // V8_IA32_CODE_STUBS_IA32_H_ 373 #endif // V8_IA32_CODE_STUBS_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698