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

Unified Diff: src/compiler/linkage-impl.h

Issue 1205023002: [turbofan] Add basic support for calling to (a subset of) C functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix argument slots. 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
Index: src/compiler/linkage-impl.h
diff --git a/src/compiler/linkage-impl.h b/src/compiler/linkage-impl.h
index 76b40faf350965291742520f2d37f695c8605c46..0a18f6e8db21301d833ab31ed8746e745d11d40f 100644
--- a/src/compiler/linkage-impl.h
+++ b/src/compiler/linkage-impl.h
@@ -204,11 +204,13 @@ class LinkageHelper {
// Add register and/or stack parameter(s).
const int parameter_count = static_cast<int>(msig->parameter_count());
+ int stack_offset = LinkageTraits::CStackBackingStoreLength();
for (int i = 0; i < parameter_count; i++) {
if (i < LinkageTraits::CRegisterParametersLength()) {
locations.AddParam(regloc(LinkageTraits::CRegisterParameter(i)));
} else {
- locations.AddParam(stackloc(-1 - i));
+ locations.AddParam(stackloc(-1 - stack_offset));
+ stack_offset++;
}
}

Powered by Google App Engine
This is Rietveld 408576698