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

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

Issue 1287383003: Re-reland: Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Updated to ToT Created 5 years, 3 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
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::NumAllocatableRegisters(); i++) { 323 for (int i = 0; i < Register::kNumRegisters; i++) {
324 Register candidate = Register::FromAllocationIndex(i); 324 Register candidate = Register::from_code(i);
325 if (candidate.is(ecx)) continue; 325 if (candidate.IsAllocatable()) {
326 if (candidate.is(r1)) continue; 326 if (candidate.is(ecx)) continue;
327 if (candidate.is(r2)) continue; 327 if (candidate.is(r1)) continue;
328 if (candidate.is(r3)) continue; 328 if (candidate.is(r2)) continue;
329 return candidate; 329 if (candidate.is(r3)) continue;
330 return candidate;
331 }
330 } 332 }
331 UNREACHABLE(); 333 UNREACHABLE();
332 return no_reg; 334 return no_reg;
333 } 335 }
334 friend class RecordWriteStub; 336 friend class RecordWriteStub;
335 }; 337 };
336 338
337 enum OnNoNeedToInformIncrementalMarker { 339 enum OnNoNeedToInformIncrementalMarker {
338 kReturnOnNoNeedToInformIncrementalMarker, 340 kReturnOnNoNeedToInformIncrementalMarker,
339 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker 341 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 383
382 RegisterAllocation regs_; 384 RegisterAllocation regs_;
383 385
384 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); 386 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub);
385 }; 387 };
386 388
387 389
388 } } // namespace v8::internal 390 } } // namespace v8::internal
389 391
390 #endif // V8_IA32_CODE_STUBS_IA32_H_ 392 #endif // V8_IA32_CODE_STUBS_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698