From: Nick Foster Date: Sat, 21 Jan 2017 00:36:01 +0000 (-0800) Subject: Fix bug 106 (volk_64u_popcnt bug in generic implementation) X-Git-Tag: archive/raspbian/1.3-3+rpi1^2~17 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f05b2e96e6452005fb1c86aa7c2a8ecd8269821d;p=volk.git Fix bug 106 (volk_64u_popcnt bug in generic implementation) Gbp-Pq: Name 0008-Fix-bug-106-volk_64u_popcnt-bug-in-generic-implement.patch --- diff --git a/kernels/volk/volk_64u_popcnt.h b/kernels/volk/volk_64u_popcnt.h index 653bfb9..cbce2ec 100644 --- a/kernels/volk/volk_64u_popcnt.h +++ b/kernels/volk/volk_64u_popcnt.h @@ -84,7 +84,7 @@ volk_64u_popcnt_generic(uint64_t* ret, const uint64_t value) uint64_t retVal64 = retVal; //retVal = valueVector[1]; - retVal = (uint32_t)((value & 0xFFFFFFFF00000000ull) >> 31); + retVal = (uint32_t)((value & 0xFFFFFFFF00000000ull) >> 32); retVal = (retVal & 0x55555555) + (retVal >> 1 & 0x55555555); retVal = (retVal & 0x33333333) + (retVal >> 2 & 0x33333333); retVal = (retVal + (retVal >> 4)) & 0x0F0F0F0F;