From: Konstantinos Margaritis Date: Wed, 7 Oct 2020 11:28:45 +0000 (+0300) Subject: use C implementation of popcount for arm X-Git-Tag: v5.3.1^2^2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d773dd9db21e2f753ce386bfcf53e69c5113abe;p=thirdparty%2Fvectorscan.git use C implementation of popcount for arm --- diff --git a/src/util/arch/common/popcount.h b/src/util/arch/common/popcount.h index 0bd1e837..ef5776e8 100644 --- a/src/util/arch/common/popcount.h +++ b/src/util/arch/common/popcount.h @@ -53,8 +53,8 @@ u32 popcount64_impl_c(u64a x) { return (x * 0x0101010101010101) >> 56; #else // Synthesise from two 32-bit cases. - return popcount32_impl(x >> 32) + popcount32_impl(x); + return popcount32_impl_c(x >> 32) + popcount32_impl_c(x); #endif } -#endif // POPCOUNT_ARCH_COMMON_H \ No newline at end of file +#endif // POPCOUNT_ARCH_COMMON_H diff --git a/src/util/popcount.h b/src/util/popcount.h index 932fc2cf..5fd6dc33 100644 --- a/src/util/popcount.h +++ b/src/util/popcount.h @@ -39,6 +39,10 @@ #if defined(ARCH_IA32) || defined(ARCH_X86_64) #include "util/arch/x86/popcount.h" +#else +#include "util/arch/common/popcount.h" +#define popcount32_impl(x) popcount32_impl_c(x) +#define popcount64_impl(x) popcount64_impl_c(x) #endif static really_inline