summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/c-linkage.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2020-10-19 10:30:24 +0200
committerMichaël Zasso <targos@protonmail.com>2020-11-15 16:47:28 +0100
commitcd91ab5865b7dc1d959877ba014d53b0a3f6bab0 (patch)
tree42c930f40d59253d3858ba14884722327a02f050 /deps/v8/src/compiler/c-linkage.cc
parent0eb2528acddd59c8c48aa90c3364a244f29d1f77 (diff)
downloadnode-new-cd91ab5865b7dc1d959877ba014d53b0a3f6bab0.tar.gz
deps: V8: cherry-pick 7b3a27b7ae65
Original commit message: fix: correct calling convention for Windows on Arm Corrects a "Check failed: kFPParamRegisterCount == kParamRegisterCount" message when compiling v8_snapshot for Windows on Arm. Unlike x64, Windows on Arm's calling convention does not alternate between integer and float registers. Bug: chromium:1052746 Change-Id: I4c9cdafcd6e43742b94613f85b2983761cc0891a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2440717 Commit-Queue: Maya Lekova <mslekova@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/master@{#70257} Refs: https://github.com/v8/v8/commit/7b3a27b7ae65333534aea3cafc2a3f16c50e270e PR-URL: https://github.com/nodejs/node/pull/35700 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Diffstat (limited to 'deps/v8/src/compiler/c-linkage.cc')
-rw-r--r--deps/v8/src/compiler/c-linkage.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/deps/v8/src/compiler/c-linkage.cc b/deps/v8/src/compiler/c-linkage.cc
index af467f2bb1..5b395067f0 100644
--- a/deps/v8/src/compiler/c-linkage.cc
+++ b/deps/v8/src/compiler/c-linkage.cc
@@ -139,7 +139,7 @@ namespace {
#endif
} // namespace
-#ifdef V8_TARGET_OS_WIN
+#if defined(V8_TARGET_OS_WIN) && defined(V8_TARGET_ARCH_X64)
// As defined in
// https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention?view=vs-2019#parameter-passing,
// Windows calling convention doesn't differentiate between GP and FP params
@@ -176,11 +176,12 @@ void BuildParameterLocations(const MachineSignature* msig,
}
}
}
-#else // V8_TARGET_OS_WIN
+#else // defined(V8_TARGET_OS_WIN) && defined(V8_TARGET_ARCH_X64)
// As defined in https://www.agner.org/optimize/calling_conventions.pdf,
// Section 7, Linux and Mac place parameters in consecutive registers,
// differentiating between GP and FP params. That's why we maintain two
-// separate counters here.
+// separate counters here. This also applies to Arm systems following
+// the AAPCS and Windows on Arm.
void BuildParameterLocations(const MachineSignature* msig,
size_t kFPParamRegisterCount,
size_t kParamRegisterCount,
@@ -216,7 +217,7 @@ void BuildParameterLocations(const MachineSignature* msig,
}
}
}
-#endif // V8_TARGET_OS_WIN
+#endif // defined(V8_TARGET_OS_WIN) && defined(V8_TARGET_ARCH_X64)
// General code uses the above configuration data.
CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone,