Index: src/ia32/codegen-ia32.cc |
diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc |
index 36c83cce238357b2e0d37a41d1c2e30181a0101b..267fe5c596d2d14e13d8bfc25f722e26be3353b5 100644 |
--- a/src/ia32/codegen-ia32.cc |
+++ b/src/ia32/codegen-ia32.cc |
@@ -580,6 +580,7 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( |
__ push(eax); |
__ push(ebx); |
+ __ push(esi); |
__ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset)); |
@@ -620,8 +621,9 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( |
// Call into runtime if GC is required. |
__ bind(&gc_required); |
+ |
// Restore registers before jumping into runtime. |
- __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
+ __ pop(esi); |
__ pop(ebx); |
__ pop(eax); |
__ jmp(fail); |
@@ -656,12 +658,11 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( |
__ sub(edi, Immediate(Smi::FromInt(1))); |
__ j(not_sign, &loop); |
+ // Restore registers. |
+ __ pop(esi); |
__ pop(ebx); |
__ pop(eax); |
- // Restore esi. |
- __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
- |
__ bind(&only_change_map); |
// eax: value |
// ebx: target map |