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

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

Issue 1410393004: X87: Re-reland: Remove register index/code indirection. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/assembler-x87.h ('k') | src/x87/deoptimizer-x87.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_X87_CODE_STUBS_X87_H_ 5 #ifndef V8_X87_CODE_STUBS_X87_H_
6 #define V8_X87_CODE_STUBS_X87_H_ 6 #define V8_X87_CODE_STUBS_X87_H_
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 10
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 Register scratch0_orig_; 302 Register scratch0_orig_;
303 Register object_; 303 Register object_;
304 Register address_; 304 Register address_;
305 Register scratch0_; 305 Register scratch0_;
306 Register scratch1_; 306 Register scratch1_;
307 // Third scratch register is always ecx. 307 // Third scratch register is always ecx.
308 308
309 Register GetRegThatIsNotEcxOr(Register r1, 309 Register GetRegThatIsNotEcxOr(Register r1,
310 Register r2, 310 Register r2,
311 Register r3) { 311 Register r3) {
312 for (int i = 0; i < Register::NumAllocatableRegisters(); i++) { 312 for (int i = 0; i < Register::kNumRegisters; i++) {
313 Register candidate = Register::FromAllocationIndex(i); 313 Register candidate = Register::from_code(i);
314 if (candidate.is(ecx)) continue; 314 if (candidate.IsAllocatable()) {
315 if (candidate.is(r1)) continue; 315 if (candidate.is(ecx)) continue;
316 if (candidate.is(r2)) continue; 316 if (candidate.is(r1)) continue;
317 if (candidate.is(r3)) continue; 317 if (candidate.is(r2)) continue;
318 return candidate; 318 if (candidate.is(r3)) continue;
319 return candidate;
320 }
319 } 321 }
320 UNREACHABLE(); 322 UNREACHABLE();
321 return no_reg; 323 return no_reg;
322 } 324 }
323 friend class RecordWriteStub; 325 friend class RecordWriteStub;
324 }; 326 };
325 327
326 enum OnNoNeedToInformIncrementalMarker { 328 enum OnNoNeedToInformIncrementalMarker {
327 kReturnOnNoNeedToInformIncrementalMarker, 329 kReturnOnNoNeedToInformIncrementalMarker,
328 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker 330 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 RegisterAllocation regs_; 373 RegisterAllocation regs_;
372 374
373 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); 375 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub);
374 }; 376 };
375 377
376 378
377 } // namespace internal 379 } // namespace internal
378 } // namespace v8 380 } // namespace v8
379 381
380 #endif // V8_X87_CODE_STUBS_X87_H_ 382 #endif // V8_X87_CODE_STUBS_X87_H_
OLDNEW
« no previous file with comments | « src/x87/assembler-x87.h ('k') | src/x87/deoptimizer-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698