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

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

Issue 2114553002: X87: [RegisterConfiguration] Streamline access to arch defaults, simplify Registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | no next file » | 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 Register object_; 291 Register object_;
292 Register address_; 292 Register address_;
293 Register scratch0_; 293 Register scratch0_;
294 Register scratch1_; 294 Register scratch1_;
295 // Third scratch register is always ecx. 295 // Third scratch register is always ecx.
296 296
297 Register GetRegThatIsNotEcxOr(Register r1, 297 Register GetRegThatIsNotEcxOr(Register r1,
298 Register r2, 298 Register r2,
299 Register r3) { 299 Register r3) {
300 for (int i = 0; i < Register::kNumRegisters; i++) { 300 for (int i = 0; i < Register::kNumRegisters; i++) {
301 Register candidate = Register::from_code(i); 301 if (RegisterConfiguration::Crankshaft()->IsAllocatableGeneralCode(i)) {
302 if (candidate.IsAllocatable()) { 302 Register candidate = Register::from_code(i);
303 if (candidate.is(ecx)) continue; 303 if (candidate.is(ecx)) continue;
304 if (candidate.is(r1)) continue; 304 if (candidate.is(r1)) continue;
305 if (candidate.is(r2)) continue; 305 if (candidate.is(r2)) continue;
306 if (candidate.is(r3)) continue; 306 if (candidate.is(r3)) continue;
307 return candidate; 307 return candidate;
308 } 308 }
309 } 309 }
310 UNREACHABLE(); 310 UNREACHABLE();
311 return no_reg; 311 return no_reg;
312 } 312 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 RegisterAllocation regs_; 361 RegisterAllocation regs_;
362 362
363 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); 363 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub);
364 }; 364 };
365 365
366 366
367 } // namespace internal 367 } // namespace internal
368 } // namespace v8 368 } // namespace v8
369 369
370 #endif // V8_X87_CODE_STUBS_X87_H_ 370 #endif // V8_X87_CODE_STUBS_X87_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698