OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |