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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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_ |
OLD | NEW |