// Select type of intrinsic bit count instruction to use
-#if defined(_MSC_VER) // Microsoft compiler
+#if defined(_MSC_VER) && defined(_WIN64) // Microsoft compiler
#include <intrin.h>
}
+// Global variable initialized at startup that is set to true if
+// CPU on which application runs support POPCNT intrinsic.
+
+const bool CpuHasPOPCNT = cpu_has_popcnt();
+
#endif // !defined(BITCOUNT_H_INCLUDED)