From fcb3b68d62ccbddd654564c102583340f36bdb58 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 --- 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 bd91c2692f7329..f2d3ed4730f426 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.4', + 'v8_embedder_string': '-node.5', ##### 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 86a4e22c48b2a5..7dbb516e398f0b 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 {