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

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

Issue 169303007: Revert r19403: "A64: Tidy up Push and Pop TODOs." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | « src/a64/code-stubs-a64.cc ('k') | src/a64/macro-assembler-a64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/full-codegen-a64.cc
diff --git a/src/a64/full-codegen-a64.cc b/src/a64/full-codegen-a64.cc
index 17bad86372cb73954c5da95f38e8ebd9ec610551..eca3f064f37a3f9784eda69cac4f819e3e199b2a 100644
--- a/src/a64/full-codegen-a64.cc
+++ b/src/a64/full-codegen-a64.cc
@@ -183,7 +183,7 @@ void FullCodeGenerator::Generate() {
if (locals_count > 0) {
__ LoadRoot(x10, Heap::kUndefinedValueRootIndex);
- __ PushMultipleTimes(x10, locals_count);
+ __ PushMultipleTimes(locals_count, x10);
}
}
@@ -4625,11 +4625,20 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
__ Ldr(w10, FieldMemOperand(x10,
SharedFunctionInfo::kFormalParameterCountOffset));
__ LoadRoot(the_hole, Heap::kTheHoleValueRootIndex);
- __ PushMultipleTimes(the_hole, w10);
+
+ // TODO(jbramley): Write a variant of PushMultipleTimes which takes a register
+ // instead of a constant count, and use it to replace this loop.
+ Label push_argument_holes, push_frame;
+ __ Bind(&push_argument_holes);
+ __ Subs(w10, w10, 1);
+ __ B(mi, &push_frame);
+ __ Push(the_hole);
+ __ B(&push_argument_holes);
// Enter a new JavaScript frame, and initialize its slots as they were when
// the generator was suspended.
Label resume_frame;
+ __ Bind(&push_frame);
__ Bl(&resume_frame);
__ B(&done);
@@ -4666,8 +4675,16 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
// Otherwise, we push holes for the operand stack and call the runtime to fix
// up the stack and the handlers.
- __ PushMultipleTimes(the_hole, operand_stack_size);
-
+ // TODO(jbramley): Write a variant of PushMultipleTimes which takes a register
+ // instead of a constant count, and use it to replace this loop.
+ Label push_operand_holes, call_resume;
+ __ Bind(&push_operand_holes);
+ __ Subs(operand_stack_size, operand_stack_size, 1);
+ __ B(mi, &call_resume);
+ __ Push(the_hole);
+ __ B(&push_operand_holes);
+
+ __ Bind(&call_resume);
__ Mov(x10, Operand(Smi::FromInt(resume_mode)));
__ Push(generator_object, result_register(), x10);
__ CallRuntime(Runtime::kResumeJSGeneratorObject, 3);
« no previous file with comments | « src/a64/code-stubs-a64.cc ('k') | src/a64/macro-assembler-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698