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

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

Issue 1365073002: Revert of Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 Register scratch0_orig_; 313 Register scratch0_orig_;
314 Register object_; 314 Register object_;
315 Register address_; 315 Register address_;
316 Register scratch0_; 316 Register scratch0_;
317 Register scratch1_; 317 Register scratch1_;
318 // Third scratch register is always ecx. 318 // Third scratch register is always ecx.
319 319
320 Register GetRegThatIsNotEcxOr(Register r1, 320 Register GetRegThatIsNotEcxOr(Register r1,
321 Register r2, 321 Register r2,
322 Register r3) { 322 Register r3) {
323 for (int i = 0; i < Register::kNumRegisters; i++) { 323 for (int i = 0; i < Register::NumAllocatableRegisters(); i++) {
324 Register candidate = Register::from_code(i); 324 Register candidate = Register::FromAllocationIndex(i);
325 if (candidate.IsAllocatable()) { 325 if (candidate.is(ecx)) continue;
326 if (candidate.is(ecx)) continue; 326 if (candidate.is(r1)) continue;
327 if (candidate.is(r1)) continue; 327 if (candidate.is(r2)) continue;
328 if (candidate.is(r2)) continue; 328 if (candidate.is(r3)) continue;
329 if (candidate.is(r3)) continue; 329 return candidate;
330 return candidate;
331 }
332 } 330 }
333 UNREACHABLE(); 331 UNREACHABLE();
334 return no_reg; 332 return no_reg;
335 } 333 }
336 friend class RecordWriteStub; 334 friend class RecordWriteStub;
337 }; 335 };
338 336
339 enum OnNoNeedToInformIncrementalMarker { 337 enum OnNoNeedToInformIncrementalMarker {
340 kReturnOnNoNeedToInformIncrementalMarker, 338 kReturnOnNoNeedToInformIncrementalMarker,
341 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker 339 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 381
384 RegisterAllocation regs_; 382 RegisterAllocation regs_;
385 383
386 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); 384 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub);
387 }; 385 };
388 386
389 387
390 } } // namespace v8::internal 388 } } // namespace v8::internal
391 389
392 #endif // V8_IA32_CODE_STUBS_IA32_H_ 390 #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