Fix bug 106 (volk_64u_popcnt bug in generic implementation)
authorNick Foster <bistromath@gmail.com>
Sat, 21 Jan 2017 00:36:01 +0000 (16:36 -0800)
committerA. Maitland Bottoms <bottoms@debian.org>
Sun, 4 Feb 2018 18:12:21 +0000 (18:12 +0000)
Gbp-Pq: Name 0008-Fix-bug-106-volk_64u_popcnt-bug-in-generic-implement.patch

kernels/volk/volk_64u_popcnt.h

index 653bfb923da563e3526947fdc7e6d229ecc059b1..cbce2ec7c7d62c92df8e7115c0ab84b65a7bdabd 100644 (file)
@@ -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;