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

Unified Diff: src/arm/full-codegen-arm.cc

Issue 13843022: Fix generator suspend and resume on ARM (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 7 years, 8 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/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/full-codegen-arm.cc
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
index 0647f5edc9aeb548f2b07bfdf938e95c85be57f8..2a8b9eea4457a002acb22a9f613630a0665cd651 100644
--- a/src/arm/full-codegen-arm.cc
+++ b/src/arm/full-codegen-arm.cc
@@ -2002,12 +2002,12 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
__ ldr(r3, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset));
__ ldr(r3,
FieldMemOperand(r3, SharedFunctionInfo::kFormalParameterCountOffset));
- __ Move(r2, isolate()->factory()->the_hole_value());
+ __ LoadRoot(r2, Heap::kTheHoleValueRootIndex);
Label push_argument_holes;
__ bind(&push_argument_holes);
__ push(r2);
- __ sub(r3, r3, Operand(1));
- __ b(vc, &push_argument_holes);
+ __ sub(r3, r3, Operand(1), SetCC);
+ __ b(pl, &push_argument_holes);
// Enter a new JavaScript frame, and initialize its slots as they were when
// the generator was suspended.
@@ -2016,6 +2016,7 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
__ bl(&resume_frame);
__ jmp(&done);
__ bind(&resume_frame);
+ __ push(lr); // Return address.
__ push(fp); // Caller's frame pointer.
__ mov(fp, sp);
__ push(cp); // Callee's context.
@@ -2046,8 +2047,8 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
// up the stack and the handlers.
Label push_operand_holes, call_resume;
__ bind(&push_operand_holes);
- __ sub(r3, r3, Operand(1));
- __ b(vs, &call_resume);
+ __ sub(r3, r3, Operand(1), SetCC);
+ __ b(mi, &call_resume);
__ push(r2);
__ b(&push_operand_holes);
__ bind(&call_resume);
« no previous file with comments | « no previous file | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698