]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
use C implementation of popcount for arm
authorKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Wed, 7 Oct 2020 11:28:45 +0000 (14:28 +0300)
committerKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Wed, 7 Oct 2020 11:28:45 +0000 (14:28 +0300)
src/util/arch/common/popcount.h
src/util/popcount.h

index 0bd1e837101f8a1b29c59239902e13645292b70f..ef5776e86b7e3dda449522f77a3f15eddc4664a8 100644 (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
\ No newline at end of file
+#endif // POPCOUNT_ARCH_COMMON_H
index 932fc2cfa77f51d3701ffa08851559c16360fc4b..5fd6dc331f59aa76a6ceee8945ea1828cb52cc5d 100644 (file)
 
 #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