Skip to content

Commit be34777

Browse files
zcbenzdanielleadams
authored andcommitted
deps: cherry-pick win/arm64/clang fixes
Refs: ngtcp2/nghttp3#112 Refs: ngtcp2/ngtcp2#692 Refs: HdrHistogram/HdrHistogram_c#114 PR-URL: #47011 Refs: ngtcp2/nghttp3#112 Refs: ngtcp2/ngtcp2#692 Refs: HdrHistogram/HdrHistogram_c#114 Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
1 parent 873606b commit be34777

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

deps/histogram/src/hdr_atomic.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#define HDR_ATOMIC_H__
99

1010

11-
#if defined(_MSC_VER)
11+
#if defined(_MSC_VER) && !(defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64)))
1212

1313
#include <stdint.h>
1414
#include <intrin.h>

deps/histogram/src/hdr_histogram.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static int64_t power(int64_t base, int64_t exp)
127127
return result;
128128
}
129129

130-
#if defined(_MSC_VER)
130+
#if defined(_MSC_VER) && !(defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64)))
131131
# if defined(_WIN64)
132132
# pragma intrinsic(_BitScanReverse64)
133133
# else
@@ -137,7 +137,7 @@ static int64_t power(int64_t base, int64_t exp)
137137

138138
static int32_t count_leading_zeros_64(int64_t value)
139139
{
140-
#if defined(_MSC_VER)
140+
#if defined(_MSC_VER) && !(defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64)))
141141
uint32_t leading_zero = 0;
142142
#if defined(_WIN64)
143143
_BitScanReverse64(&leading_zero, value);

deps/ngtcp2/nghttp3/lib/nghttp3_ringbuf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
#include "nghttp3_macro.h"
3535

36-
#if defined(_MSC_VER) && defined(_M_ARM64)
36+
#if defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64))
3737
unsigned int __popcnt(unsigned int x) {
3838
unsigned int c = 0;
3939
for (; x; ++c) {

deps/ngtcp2/ngtcp2/lib/ngtcp2_ringbuf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#include "ngtcp2_macro.h"
3333

34-
#if defined(_MSC_VER) && defined(_M_ARM64)
34+
#if defined(_MSC_VER) && !defined(__clang__) && (defined(_M_ARM) || defined(_M_ARM64))
3535
unsigned int __popcnt(unsigned int x) {
3636
unsigned int c = 0;
3737
for (; x; ++c) {

0 commit comments

Comments
 (0)