Skip to content

Commit cd91ab5

Browse files
committed
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: v8/v8@7b3a27b PR-URL: #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>
1 parent 0eb2528 commit cd91ab5

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.12',
39+
'v8_embedder_string': '-node.13',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/compiler/c-linkage.cc

+5-4
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ namespace {
139139
#endif
140140
} // namespace
141141

142-
#ifdef V8_TARGET_OS_WIN
142+
#if defined(V8_TARGET_OS_WIN) && defined(V8_TARGET_ARCH_X64)
143143
// As defined in
144144
// https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention?view=vs-2019#parameter-passing,
145145
// Windows calling convention doesn't differentiate between GP and FP params
@@ -176,11 +176,12 @@ void BuildParameterLocations(const MachineSignature* msig,
176176
}
177177
}
178178
}
179-
#else // V8_TARGET_OS_WIN
179+
#else // defined(V8_TARGET_OS_WIN) && defined(V8_TARGET_ARCH_X64)
180180
// As defined in https://www.agner.org/optimize/calling_conventions.pdf,
181181
// Section 7, Linux and Mac place parameters in consecutive registers,
182182
// differentiating between GP and FP params. That's why we maintain two
183-
// separate counters here.
183+
// separate counters here. This also applies to Arm systems following
184+
// the AAPCS and Windows on Arm.
184185
void BuildParameterLocations(const MachineSignature* msig,
185186
size_t kFPParamRegisterCount,
186187
size_t kParamRegisterCount,
@@ -216,7 +217,7 @@ void BuildParameterLocations(const MachineSignature* msig,
216217
}
217218
}
218219
}
219-
#endif // V8_TARGET_OS_WIN
220+
#endif // defined(V8_TARGET_OS_WIN) && defined(V8_TARGET_ARCH_X64)
220221

221222
// General code uses the above configuration data.
222223
CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone,

0 commit comments

Comments
 (0)