diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc index 6e609934c0..576e2f4f17 100644 --- a/src/x64/stub-cache-x64.cc +++ b/src/x64/stub-cache-x64.cc @@ -1384,19 +1384,19 @@ Handle CallStubCompiler::CompileArrayPushCall( __ CheckFastSmiOnlyElements(rbx, &call_builtin); // rdx: receiver // rbx: map + __ movq(r9, rdi); // Backup rdi as it is going to be trashed. __ LoadTransitionedArrayMapConditional(FAST_SMI_ONLY_ELEMENTS, FAST_ELEMENTS, rbx, - r10, + rdi, &call_builtin); ElementsTransitionGenerator::GenerateSmiOnlyToObject(masm()); + __ movq(rdi, r9); __ bind(&fast_object); } else { __ CheckFastObjectElements(rbx, &call_builtin); } - __ CheckFastObjectElements(rbx, &call_builtin); - // Save new length. __ Integer32ToSmiField(FieldOperand(rdx, JSArray::kLengthOffset), rax);