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

Unified Diff: src/arm64/code-stubs-arm64.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/arm/interface-descriptors-arm.cc ('k') | src/arm64/interface-descriptors-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/code-stubs-arm64.cc
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
index 6bcfb65a3f56cb6957cc87b55781089f446b3cca..fc511dc37731a7383b448d4e336dc0f88e9129bb 100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -2122,22 +2122,25 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
- // Stack layout on entry.
- // jssp[0]: language mode (tagged)
- // jssp[8]: index of rest parameter (tagged)
- // jssp[16]: number of parameters (tagged)
- // jssp[24]: address of receiver argument
+ // x2 : number of parameters (tagged)
+ // x3 : parameters pointer
+ // x4 : rest parameter index (tagged)
+ // x1 : language mode (tagged)
//
// Returns pointer to result object in x0.
+ DCHECK(x2.is(ArgumentsAccessNewDescriptor::parameter_count()));
+ DCHECK(x3.is(RestParamAccessDescriptor::parameter_pointer()));
+ DCHECK(x4.is(RestParamAccessDescriptor::rest_parameter_index()));
+ DCHECK(x1.is(RestParamAccessDescriptor::language_mode()));
+
// Get the stub arguments from the frame, and make an untagged copy of the
// parameter count.
Register language_mode_smi = x1;
- Register rest_index_smi = x2;
- Register param_count_smi = x3;
- Register params = x4;
+ Register rest_index_smi = x4;
+ Register param_count_smi = x2;
+ Register params = x3;
Register param_count = x13;
- __ Pop(language_mode_smi, rest_index_smi, param_count_smi, params);
__ SmiUntag(param_count, param_count_smi);
// Test if arguments adaptor needed.
@@ -2151,9 +2154,9 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
__ B(ne, &runtime);
// x1 language_mode_smi language mode
- // x2 rest_index_smi index of rest parameter
- // x3 param_count_smi number of parameters passed to function (smi)
- // x4 params pointer to parameters
+ // x4 rest_index_smi index of rest parameter
+ // x2 param_count_smi number of parameters passed to function (smi)
+ // x3 params pointer to parameters
// x11 caller_fp caller's frame pointer
// x13 param_count number of parameters passed to function
@@ -2165,7 +2168,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
__ Add(params, x10, StandardFrameConstants::kCallerSPOffset);
__ Bind(&runtime);
- __ Push(params, param_count_smi, rest_index_smi, language_mode_smi);
+ __ Push(param_count_smi, params, rest_index_smi, language_mode_smi);
__ TailCallRuntime(Runtime::kNewRestParam);
}
« no previous file with comments | « src/arm/interface-descriptors-arm.cc ('k') | src/arm64/interface-descriptors-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698