| Index: src/x64/stub-cache-x64.cc
|
| diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
|
| index d6e70e5f25f82765b4a7c4f041eea9b217674d94..090d4d65599f82b40d0f0644f6dbadec0b8ee22c 100644
|
| --- a/src/x64/stub-cache-x64.cc
|
| +++ b/src/x64/stub-cache-x64.cc
|
| @@ -3776,10 +3776,11 @@ void KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(
|
|
|
| __ bind(&smi_value);
|
| // Value is a smi. convert to a double and store.
|
| - __ SmiToInteger32(rax, rax);
|
| - __ push(rax);
|
| + // Preserve original value.
|
| + __ SmiToInteger32(rdx, rax);
|
| + __ push(rdx);
|
| __ fild_s(Operand(rsp, 0));
|
| - __ pop(rax);
|
| + __ pop(rdx);
|
| __ SmiToInteger32(rcx, rcx);
|
| __ fstp_d(FieldOperand(rdi, rcx, times_8, FixedDoubleArray::kHeaderSize));
|
| __ ret(0);
|
|
|