From 9dd097325a93bb3ebf93babe4a63504fb9b165c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Fri, 14 Jan 2022 17:41:42 +0100 Subject: [PATCH] deps: V8: cherry-pick 3b6b21f595f6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Commit-Queue: Clemens Backes Cr-Commit-Position: refs/heads/main@{#78515} Refs: https://github.com/v8/v8/commit/3b6b21f595f6c172b5b77bf85a3882516f7d7f1b Fixes: https://github.com/nodejs/node/issues/41402 PR-URL: https://github.com/nodejs/node/pull/41457 Reviewed-By: Jiawen Geng Reviewed-By: Richard Lau Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Darshan Sen --- deps/v8/src/wasm/baseline/arm/liftoff-assembler-arm.h | 2 +- deps/v8/src/wasm/baseline/liftoff-compiler.cc | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/deps/v8/src/wasm/baseline/arm/liftoff-assembler-arm.h b/deps/v8/src/wasm/baseline/arm/liftoff-assembler-arm.h index 6e2bacc043910b..929371f5f97be4 100644 --- a/deps/v8/src/wasm/baseline/arm/liftoff-assembler-arm.h +++ b/deps/v8/src/wasm/baseline/arm/liftoff-assembler-arm.h @@ -438,7 +438,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(pc_offset()); diff --git a/deps/v8/src/wasm/baseline/liftoff-compiler.cc b/deps/v8/src/wasm/baseline/liftoff-compiler.cc index eeed531cf83471..92ee9efd67ae3a 100644 --- a/deps/v8/src/wasm/baseline/liftoff-compiler.cc +++ b/deps/v8/src/wasm/baseline/liftoff-compiler.cc @@ -310,6 +310,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)};