diff options
Diffstat (limited to 'deps/v8/src/x87/code-stubs-x87.h')
-rw-r--r-- | deps/v8/src/x87/code-stubs-x87.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/deps/v8/src/x87/code-stubs-x87.h b/deps/v8/src/x87/code-stubs-x87.h index 25fc4d7718..a6a2a13057 100644 --- a/deps/v8/src/x87/code-stubs-x87.h +++ b/deps/v8/src/x87/code-stubs-x87.h @@ -309,13 +309,15 @@ class RecordWriteStub: public PlatformCodeStub { Register GetRegThatIsNotEcxOr(Register r1, Register r2, Register r3) { - for (int i = 0; i < Register::NumAllocatableRegisters(); i++) { - Register candidate = Register::FromAllocationIndex(i); - if (candidate.is(ecx)) continue; - if (candidate.is(r1)) continue; - if (candidate.is(r2)) continue; - if (candidate.is(r3)) continue; - return candidate; + for (int i = 0; i < Register::kNumRegisters; i++) { + Register candidate = Register::from_code(i); + if (candidate.IsAllocatable()) { + if (candidate.is(ecx)) continue; + if (candidate.is(r1)) continue; + if (candidate.is(r2)) continue; + if (candidate.is(r3)) continue; + return candidate; + } } UNREACHABLE(); return no_reg; @@ -374,6 +376,7 @@ class RecordWriteStub: public PlatformCodeStub { }; -} } // namespace v8::internal +} // namespace internal +} // namespace v8 #endif // V8_X87_CODE_STUBS_X87_H_ |