deps: cherry-pick win/arm64/clang fixes

Refs: ngtcp2/nghttp3#112
Refs: ngtcp2/ngtcp2#692
Refs: HdrHistogram/HdrHistogram_c#114
PR-URL: https://github.com/nodejs/node/pull/47011
Refs: https://github.com/ngtcp2/nghttp3/pull/112
Refs: https://github.com/ngtcp2/ngtcp2/pull/692
Refs: https://github.com/HdrHistogram/HdrHistogram_c/pull/114
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
This commit is contained in:
Cheng Zhao 2023-03-19 18:25:47 +09:00 committed by GitHub
parent 142d6af8c1
commit 0fd14e4034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@
#define HDR_ATOMIC_H__
#if defined(_MSC_VER)
#if defined(_MSC_VER) && !(defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64)))
#include <stdint.h>
#include <intrin.h>

View File

@ -127,7 +127,7 @@ static int64_t power(int64_t base, int64_t exp)
return result;
}
#if defined(_MSC_VER)
#if defined(_MSC_VER) && !(defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64)))
# if defined(_WIN64)
# pragma intrinsic(_BitScanReverse64)
# else
@ -137,7 +137,7 @@ static int64_t power(int64_t base, int64_t exp)
static int32_t count_leading_zeros_64(int64_t value)
{
#if defined(_MSC_VER)
#if defined(_MSC_VER) && !(defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64)))
uint32_t leading_zero = 0;
#if defined(_WIN64)
_BitScanReverse64(&leading_zero, value);

View File

@ -33,7 +33,7 @@
#include "nghttp3_macro.h"
#if defined(_MSC_VER) && defined(_M_ARM64)
#if defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64))
unsigned int __popcnt(unsigned int x) {
unsigned int c = 0;
for (; x; ++c) {

View File

@ -31,7 +31,7 @@
#include "ngtcp2_macro.h"
#if defined(_MSC_VER) && defined(_M_ARM64)
#if defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64))
unsigned int __popcnt(unsigned int x) {
unsigned int c = 0;
for (; x; ++c) {