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

Unified Diff: src/ppc/builtins-ppc.cc

Issue 1216073004: PPC: Clean up copy args loop in Generate_JSConstructStubHelper. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/ppc/builtins-ppc.cc
diff --git a/src/ppc/builtins-ppc.cc b/src/ppc/builtins-ppc.cc
index 99e7ea34165616ccd3987bed4524884f65594648..11b3b697f4bc41bd0f9b874fbd4978a2019908c9 100644
--- a/src/ppc/builtins-ppc.cc
+++ b/src/ppc/builtins-ppc.cc
@@ -641,7 +641,6 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// Retrieve smi-tagged arguments count from the stack.
__ LoadP(r6, MemOperand(sp));
- __ SmiUntag(r3, r6);
// Push new.target onto the construct frame. This is stored just below the
// receiver on the stack.
@@ -655,7 +654,6 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ addi(r5, fp, Operand(StandardFrameConstants::kCallerSPOffset));
// Copy arguments and receiver to the expression stack.
- // r3: number of arguments
// r4: constructor function
// r5: address of last argument (caller sp)
// r6: number of arguments (smi-tagged)
@@ -664,14 +662,15 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// sp[2]: new.target (if used)
// sp[2/3]: number of arguments (smi-tagged)
Label loop, no_args;
- __ cmpi(r3, Operand::Zero());
- __ beq(&no_args);
+ __ SmiUntag(r3, r6, SetRC);
+ __ beq(&no_args, cr0);
__ ShiftLeftImm(ip, r3, Operand(kPointerSizeLog2));
+ __ sub(sp, sp, ip);
__ mtctr(r3);
__ bind(&loop);
__ subi(ip, ip, Operand(kPointerSize));
__ LoadPX(r0, MemOperand(r5, ip));
- __ push(r0);
+ __ StorePX(r0, MemOperand(sp, ip));
__ bdnz(&loop);
__ bind(&no_args);
« 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