Commit 7350a4b1 authored by Orvid King's avatar Orvid King Committed by Facebook Github Bot

Support __builtin_popcountl on Windows

Summary: Because Bits.h feels the need to exercise all variants of popcount.

Reviewed By: yfeldblum

Differential Revision: D9565298

fbshipit-source-id: 307b3e4a70216c76d63104853e91e36a340ff1ab
parent f04c4928
......@@ -87,6 +87,11 @@ FOLLY_ALWAYS_INLINE int __builtin_popcount(unsigned int x) {
return int(__popcnt(x));
}
FOLLY_ALWAYS_INLINE int __builtin_popcountl(unsigned long x) {
static_assert(sizeof(x) == 4, "");
return int(__popcnt(x));
}
FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) {
return int(__popcnt64(x));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment