From a41c381cded954f453e23fea36f5907fb0a65ebd Mon Sep 17 00:00:00 2001 From: Stefan Stojanovic Date: Tue, 28 May 2024 09:10:52 +0200 Subject: [PATCH] deps: fix FP16 bitcasts.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/53134 Refs: https://github.com/nodejs/node/issues/52809 Reviewed-By: Yagiz Nizipli Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell PR-URL: https://github.com/nodejs/node/pull/54077 Reviewed-By: Jiawen Geng Reviewed-By: Richard Lau Reviewed-By: Joyee Cheung Reviewed-By: Marco Ippolito --- common.gypi | 2 +- deps/v8/third_party/fp16/src/include/fp16/bitcasts.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common.gypi b/common.gypi index af2f3d9cb1a..9d4d89afcd5 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.7', + 'v8_embedder_string': '-node.8', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/third_party/fp16/src/include/fp16/bitcasts.h b/deps/v8/third_party/fp16/src/include/fp16/bitcasts.h index 86a4e22c48b..7dbb516e398 100644 --- a/deps/v8/third_party/fp16/src/include/fp16/bitcasts.h +++ b/deps/v8/third_party/fp16/src/include/fp16/bitcasts.h @@ -12,7 +12,7 @@ #include #endif -#if defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) +#if defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64)) #include #endif @@ -24,7 +24,7 @@ static inline float fp32_from_bits(uint32_t w) { return __uint_as_float((unsigned int) w); #elif defined(__INTEL_COMPILER) return _castu32_f32(w); -#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) +#elif defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64)) return _CopyFloatFromInt32((__int32) w); #else union { @@ -42,7 +42,7 @@ static inline uint32_t fp32_to_bits(float f) { return (uint32_t) __float_as_uint(f); #elif defined(__INTEL_COMPILER) return _castf32_u32(f); -#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) +#elif defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64)) return (uint32_t) _CopyInt32FromFloat(f); #else union { @@ -60,7 +60,7 @@ static inline double fp64_from_bits(uint64_t w) { return __longlong_as_double((long long) w); #elif defined(__INTEL_COMPILER) return _castu64_f64(w); -#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) +#elif defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64)) return _CopyDoubleFromInt64((__int64) w); #else union { @@ -78,7 +78,7 @@ static inline uint64_t fp64_to_bits(double f) { return (uint64_t) __double_as_longlong(f); #elif defined(__INTEL_COMPILER) return _castf64_u64(f); -#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) +#elif defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64)) return (uint64_t) _CopyInt64FromDouble(f); #else union {