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

Unified Diff: src/crankshaft/arm64/lithium-codegen-arm64.cc

Issue 2353303002: [crankshaft] HCallWithDescriptor is now able to pass arguments on the stack. (Closed)
Patch Set: arm64 fix Created 4 years, 3 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/crankshaft/arm64/lithium-arm64.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/arm64/lithium-codegen-arm64.cc
diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc
index 5c65c5a9e42a94fdc368dd892c045f0f5b785bcc..6303d90a034a4a06cca92e3d99bc907eec6f4b46 100644
--- a/src/crankshaft/arm64/lithium-codegen-arm64.cc
+++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc
@@ -1968,7 +1968,16 @@ void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) {
generator.AfterCall();
}
- RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta());
+ HCallWithDescriptor* hinstr = instr->hydrogen();
+ RecordPushedArgumentsDelta(hinstr->argument_delta());
+
+ // HCallWithDescriptor instruction is translated to zero or more
+ // LPushArguments (they handle parameters passed on the stack) followed by
+ // a LCallWithDescriptor. Each LPushArguments instruction generated records
+ // the number of arguments pushed thus we need to offset them here.
+ // The |argument_delta()| used above "knows" only about JS parameters while
+ // we are dealing here with particular calling convention details.
+ RecordPushedArgumentsDelta(-hinstr->descriptor().GetStackParameterCount());
}
« no previous file with comments | « src/crankshaft/arm64/lithium-arm64.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698