mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-30 03:34:25 +03:00
moved HAVE_BUILTIN_POPCOUNT def to cmake
This commit is contained in:
@@ -44,7 +44,6 @@
|
||||
#endif
|
||||
#ifdef __NetBSD__
|
||||
#include <strings.h>
|
||||
#define HAVE_LOCAL_POPCOUNT
|
||||
#endif
|
||||
|
||||
#endif // UTIL_ARCH_X86_H_
|
||||
|
@@ -37,7 +37,7 @@
|
||||
#include "ue2common.h"
|
||||
#include "util/arch.h"
|
||||
|
||||
#ifndef HAVE_LOCAL_POPCOUNT
|
||||
#ifndef HAVE_BUILTIN_POPCOUNT
|
||||
static really_inline
|
||||
u32 popcount32(u32 x) {
|
||||
return __builtin_popcount(x);
|
||||
@@ -52,7 +52,7 @@ u32 popcount32(u32 x) {
|
||||
// return (((x + (x >> 4)) & 0xf0f0f0f) * 0x1010101) >> 24;
|
||||
// #endif
|
||||
}
|
||||
#endif /* HAVE_LOCAL_POPCOUNT */
|
||||
#endif /* HAVE_BUILTIN_POPCOUNT */
|
||||
|
||||
static really_inline
|
||||
u32 popcount32x4(u32 const *x) {
|
||||
@@ -63,7 +63,7 @@ u32 popcount32x4(u32 const *x) {
|
||||
return sum;
|
||||
}
|
||||
|
||||
#ifndef HAVE_LOCAL_POPCOUNT
|
||||
#ifndef HAVE_BUILTIN_POPCOUNT
|
||||
static really_inline
|
||||
u32 popcount64(u64a x) {
|
||||
return __builtin_popcountll(x);
|
||||
@@ -84,7 +84,7 @@ u32 popcount64(u64a x) {
|
||||
// return popcount32(x >> 32) + popcount32(x);
|
||||
// #endif
|
||||
}
|
||||
#endif /* HAVE_LOCAL_POPCOUNT */
|
||||
#endif /* HAVE_BUILTIN_POPCOUNT */
|
||||
|
||||
static really_inline
|
||||
u32 popcount64x4(u64a const *x) {
|
||||
|
Reference in New Issue
Block a user