use C implementation of popcount for arm

This commit is contained in:
Konstantinos Margaritis 2020-10-07 14:28:45 +03:00
parent 4c924cc920
commit 5d773dd9db
2 changed files with 6 additions and 2 deletions

View File

@ -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
#endif // POPCOUNT_ARCH_COMMON_H

View File

@ -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