Skip to content

Commit

Permalink
deps: V8: cherry-pick 3b6b21f595f6
Browse files Browse the repository at this point in the history
Original commit message:

    [liftoff] Allow bailout for missing ARMv7

    The bailout is there explicitly in the code, so we should allow it in
    {CheckBailoutAllowed}.

    R=ahaas@chromium.org

    Bug: v8:12527
    Change-Id: Ifd906afb5f034f05c2bf7d9a28e3ab458549e7ef
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3372915
    Reviewed-by: Andreas Haas <ahaas@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#78515}

Refs: v8/v8@3b6b21f

Fixes: nodejs#41402

PR-URL: nodejs#41457
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
targos authored and VoltrexKeyva committed Feb 3, 2022
1 parent 6595b38 commit a10b542
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.9',
'v8_embedder_string': '-node.10',

##### V8 defaults for Node.js #####

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/wasm/baseline/arm/liftoff-assembler-arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ inline void EmitAnyTrue(LiftoffAssembler* assm, LiftoffRegister dst,

int LiftoffAssembler::PrepareStackFrame() {
if (!CpuFeatures::IsSupported(ARMv7)) {
bailout(kUnsupportedArchitecture, "Armv6 not supported");
bailout(kUnsupportedArchitecture, "Liftoff needs ARMv7");
return 0;
}
uint32_t offset = static_cast<uint32_t>(pc_offset());
Expand Down
7 changes: 7 additions & 0 deletions deps/v8/src/wasm/baseline/liftoff-compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,13 @@ void CheckBailoutAllowed(LiftoffBailoutReason reason, const char* detail,
return;
#endif

#if V8_TARGET_ARCH_ARM
// Allow bailout for missing ARMv7 support.
if (!CpuFeatures::IsSupported(ARMv7) && reason == kUnsupportedArchitecture) {
return;
}
#endif

#define LIST_FEATURE(name, ...) kFeature_##name,
constexpr WasmFeatures kExperimentalFeatures{
FOREACH_WASM_EXPERIMENTAL_FEATURE_FLAG(LIST_FEATURE)};
Expand Down

0 comments on commit a10b542

Please sign in to comment.