| Index: src/x87/code-stubs-x87.h
|
| diff --git a/src/x87/code-stubs-x87.h b/src/x87/code-stubs-x87.h
|
| index 41c77f5df784d6fd0aee342ed5864a5e84097d2a..a6a2a1305735b33b78ae9da1c95a22ba8dddfe2c 100644
|
| --- a/src/x87/code-stubs-x87.h
|
| +++ b/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;
|
|
|