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

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

Issue 1203103003: Unify the stack layout for construct frames (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix deopt case and clean up constants 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 | « src/mips64/frames-mips64.h ('k') | src/ppc/frames-ppc.h » ('j') | 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 0817b523b71781143c6fd37e353bcafdfb76a720..dbf9dc1979956efd243edcccad5c8eda03ddb873 100644
--- a/src/ppc/builtins-ppc.cc
+++ b/src/ppc/builtins-ppc.cc
@@ -626,15 +626,15 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ bind(&count_incremented);
}
+ __ Pop(r4);
+
__ Push(r7, r7);
// Reload the number of arguments and the constructor from the stack.
// sp[0]: receiver
// sp[1]: receiver
- // sp[2]: constructor function
- // sp[3]: number of arguments (smi-tagged)
- __ LoadP(r4, MemOperand(sp, 2 * kPointerSize));
- __ LoadP(r6, MemOperand(sp, 3 * kPointerSize));
+ // sp[2]: number of arguments (smi-tagged)
+ __ LoadP(r6, MemOperand(sp, 2 * kPointerSize));
// Set up pointer to last argument.
__ addi(r5, fp, Operand(StandardFrameConstants::kCallerSPOffset));
@@ -649,8 +649,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// r6: number of arguments (smi-tagged)
// sp[0]: receiver
// sp[1]: receiver
- // sp[2]: constructor function
- // sp[3]: number of arguments (smi-tagged)
+ // sp[2]: number of arguments (smi-tagged)
Label loop, no_args;
__ cmpi(r3, Operand::Zero());
__ beq(&no_args);
@@ -683,8 +682,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// Restore context from the frame.
// r3: result
// sp[0]: receiver
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
+ // sp[1]: number of arguments (smi-tagged)
__ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
// If the result is an object (in the ECMA sense), we should get rid
@@ -695,8 +693,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// If the result is a smi, it is *not* an object in the ECMA sense.
// r3: result
// sp[0]: receiver (newly allocated object)
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
+ // sp[1]: number of arguments (smi-tagged)
__ JumpIfSmi(r3, &use_receiver);
// If the type of the result (stored in its map) is less than
@@ -714,9 +711,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ bind(&exit);
// r3: result
// sp[0]: receiver (newly allocated object)
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
- __ LoadP(r4, MemOperand(sp, 2 * kPointerSize));
+ // sp[1]: number of arguments (smi-tagged)
+ __ LoadP(r4, MemOperand(sp, kPointerSize));
// Leave construct frame.
}
« no previous file with comments | « src/mips64/frames-mips64.h ('k') | src/ppc/frames-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698