diff --git a/src/x87/code-stubs-x87.h b/src/x87/code-stubs-x87.h index 39a4603626f..6290cfed1c3 100644 --- a/src/x87/code-stubs-x87.h +++ b/src/x87/code-stubs-x87.h @@ -298,8 +298,8 @@ class RecordWriteStub: public PlatformCodeStub { Register r2, Register r3) { for (int i = 0; i < Register::kNumRegisters; i++) { - Register candidate = Register::from_code(i); - if (candidate.IsAllocatable()) { + if (RegisterConfiguration::Crankshaft()->IsAllocatableGeneralCode(i)) { + Register candidate = Register::from_code(i); if (candidate.is(ecx)) continue; if (candidate.is(r1)) continue; if (candidate.is(r2)) continue;