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

Unified Diff: src/mips/code-stubs-mips.cc

Issue 1556913002: Use register arguments for RestParamAccessStub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 4 years, 12 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/interface-descriptors.cc ('k') | src/mips/interface-descriptors-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index 86d63c444f86941130f1bea5d8db08ec29f5dc3d..f3f00e1f6e2b5f4d7581307e11d4f7b6f57ccb2f 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -1967,29 +1967,27 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
- // sp[0] : language mode
- // sp[4] : index of rest parameter
- // sp[8] : number of parameters
- // sp[12] : receiver displacement
+ // a2 : number of parameters (tagged)
+ // a3 : parameters pointer
+ // a1 : rest parameter index (tagged)
+ // a0 : language mode (tagged)
// Check if the calling frame is an arguments adaptor frame.
Label runtime;
- __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
- __ lw(a3, MemOperand(a2, StandardFrameConstants::kContextOffset));
- __ Branch(&runtime, ne, a3,
+ __ lw(t0, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
+ __ lw(t1, MemOperand(t0, StandardFrameConstants::kContextOffset));
+ __ Branch(&runtime, ne, t1,
Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
// Patch the arguments.length and the parameters pointer.
- __ lw(a1, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset));
- __ sw(a1, MemOperand(sp, 2 * kPointerSize));
- __ sll(at, a1, kPointerSizeLog2 - kSmiTagSize);
- __ Addu(a3, a2, Operand(at));
-
+ __ lw(a2, MemOperand(t0, ArgumentsAdaptorFrameConstants::kLengthOffset));
+ __ sll(t1, a2, kPointerSizeLog2 - kSmiTagSize);
+ __ Addu(a3, t0, Operand(t1));
__ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset));
- __ sw(a3, MemOperand(sp, 3 * kPointerSize));
// Do the runtime call to allocate the arguments object.
__ bind(&runtime);
+ __ Push(a2, a3, a1, a0);
__ TailCallRuntime(Runtime::kNewRestParam);
}
« no previous file with comments | « src/interface-descriptors.cc ('k') | src/mips/interface-descriptors-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698