ICC doesn't have a __POPCNT__ macro

This commit is contained in:
Matthew Barr 2017-03-29 13:04:27 +11:00
parent 1f3a000bfa
commit 803f61d818

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015-2016, Intel Corporation * Copyright (c) 2015-2017, Intel Corporation
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
@ -30,8 +30,8 @@
* \brief Platform specific popcount functions * \brief Platform specific popcount functions
*/ */
#ifndef POPCOUNT_H_075D843B4545B6 #ifndef UTIL_POPCOUNT_H_
#define POPCOUNT_H_075D843B4545B6 #define UTIL_POPCOUNT_H_
#include "ue2common.h" #include "ue2common.h"
@ -40,6 +40,8 @@
#define HAVE_POPCOUNT_INSTR #define HAVE_POPCOUNT_INSTR
#elif defined(_WIN32) && defined(__AVX__) // TODO: fix win preproc #elif defined(_WIN32) && defined(__AVX__) // TODO: fix win preproc
#define HAVE_POPCOUNT_INSTR #define HAVE_POPCOUNT_INSTR
#elif defined(__INTEL_COMPILER) && defined(__SSE4_2__)
#define HAVE_POPCOUNT_INSTR
#endif #endif
static really_inline static really_inline
@ -76,5 +78,5 @@ u32 popcount64(u64a x) {
#endif #endif
} }
#endif /* POPCOUNT_H_075D843B4545B6 */ #endif /* UTIL_POPCOUNT_H_ */