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

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

Issue 2036083003: X87: [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, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/codegen-x87.cc
diff --git a/src/x87/codegen-x87.cc b/src/x87/codegen-x87.cc
index 8112d11d139492233a376c36d35c9097b018e59e..d302841fa1046dcac086cafd03597d96078680f9 100644
--- a/src/x87/codegen-x87.cc
+++ b/src/x87/codegen-x87.cc
@@ -269,6 +269,7 @@ void ElementsTransitionGenerator::GenerateSmiToDouble(
__ push(eax);
__ push(ebx);
+ __ push(esi);
__ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset));
@@ -301,8 +302,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);
@@ -338,12 +340,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 | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698