Commit 33712dc0 authored by Victor Zverovich's avatar Victor Zverovich

Combine pragmas

parent e5942ac9
......@@ -202,8 +202,14 @@ FMT_BEGIN_NAMESPACE
namespace detail {
// Avoid Clang with Microsoft CodeGen's -Wunknown-pragmas warning.
# ifndef __clang__
# pragma intrinsic(_BitScanForward)
# pragma intrinsic(_BitScanReverse)
# endif
# if defined(_WIN64) && !defined(__clang__)
# pragma intrinsic(_BitScanForward64)
# pragma intrinsic(_BitScanReverse64)
# endif
inline int clz(uint32_t x) {
unsigned long r = 0;
_BitScanReverse(&r, x);
......@@ -216,10 +222,6 @@ inline int clz(uint32_t x) {
}
# define FMT_BUILTIN_CLZ(n) detail::clz(n)
# if defined(_WIN64) && !defined(__clang__)
# pragma intrinsic(_BitScanReverse64)
# endif
inline int clzll(uint64_t x) {
unsigned long r = 0;
# ifdef _WIN64
......@@ -236,10 +238,6 @@ inline int clzll(uint64_t x) {
}
# define FMT_BUILTIN_CLZLL(n) detail::clzll(n)
// Avoid Clang with Microsoft CodeGen's -Wunknown-pragmas warning.
# ifndef __clang__
# pragma intrinsic(_BitScanForward)
# endif
inline int ctz(uint32_t x) {
unsigned long r = 0;
_BitScanForward(&r, x);
......@@ -249,10 +247,6 @@ inline int ctz(uint32_t x) {
}
# define FMT_BUILTIN_CTZ(n) detail::ctz(n)
# if defined(_WIN64) && !defined(__clang__)
# pragma intrinsic(_BitScanForward64)
# endif
inline int ctzll(uint64_t x) {
unsigned long r = 0;
FMT_ASSERT(x != 0, "");
......
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