Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Unified Diff: src/ia32/codegen-ia32.cc

Issue 2011313003: [Interpreter] Fix GenerateSmiToDouble to avoid assuming it is called from a JSFrame. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/ignition/regress-612386-smi-to-double-transition.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | test/mjsunit/ignition/regress-612386-smi-to-double-transition.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698