From 48153213538b2b4941923bcb6f61b3a3846fb624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Thu, 5 Sep 2024 07:22:42 +0200 Subject: [PATCH] deps: V8: cherry-pick 97199f686e2f Original commit message: aix: add work around for f16 type AIX builds started to fail after this commit https://chromium.googlesource.com/v8/v8.git/+/d057564707d3a5df074b7f49a12a2f1e96638f94. Change-Id: I25a5c4ae3b4fe5c27a9fb9e35e2bcd2bbed40351 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5789180 Reviewed-by: Clemens Backes Reviewed-by: Nico Hartmann Commit-Queue: Clemens Backes Cr-Commit-Position: refs/heads/main@{#95952} Refs: https://github.com/v8/v8/commit/97199f686e2f05ee126ded43b4d31ac001274d9d PR-URL: https://github.com/nodejs/node/pull/54536 Reviewed-By: Antoine du Hamel Reviewed-By: Jiawen Geng Reviewed-By: Marco Ippolito Reviewed-By: Richard Lau --- common.gypi | 2 +- deps/v8/src/utils/utils.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index 9d4d89afcd5fbc..56c79543a5c35a 100644 --- a/common.gypi +++ b/common.gypi @@ -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.8', + 'v8_embedder_string': '-node.9', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/utils/utils.h b/deps/v8/src/utils/utils.h index c578ab2a3f7481..4d8ef55942ceab 100644 --- a/deps/v8/src/utils/utils.h +++ b/deps/v8/src/utils/utils.h @@ -27,6 +27,8 @@ #if defined(V8_OS_AIX) #include // NOLINT(build/c++11) + +#include "src/wasm/float16.h" #endif #ifdef _MSC_VER @@ -814,6 +816,13 @@ T FpOpWorkaround(T input, T value) { } return value; } + +template <> +inline Float16 FpOpWorkaround(Float16 input, Float16 value) { + float result = FpOpWorkaround(input.ToFloat32(), value.ToFloat32()); + return Float16::FromFloat32(result); +} + #endif V8_EXPORT_PRIVATE bool PassesFilter(base::Vector name,