Check compiler architecture flags in one place

This commit is contained in:
Matthew Barr
2017-03-29 16:39:16 +11:00
parent 5fe524fbb3
commit 8201183138
31 changed files with 203 additions and 109 deletions

View File

@@ -34,15 +34,7 @@
#define UTIL_POPCOUNT_H_
#include "ue2common.h"
// We have a native popcount where the compiler has defined __POPCNT__.
#if defined(__POPCNT__)
#define HAVE_POPCOUNT_INSTR
#elif defined(_WIN32) && defined(__AVX__) // TODO: fix win preproc
#define HAVE_POPCOUNT_INSTR
#elif defined(__INTEL_COMPILER) && defined(__SSE4_2__)
#define HAVE_POPCOUNT_INSTR
#endif
#include "util/arch.h"
static really_inline
u32 popcount32(u32 x) {