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