Commit a13265af authored by Mike Frysinger's avatar Mike Frysinger

Blackfin: fix typo in hweight asm

Run ONES on the incoming value rather than random garbage.  This fixes
random crashes with some networking code.
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 1ae9ab17
...@@ -119,7 +119,7 @@ static inline unsigned int hweight32(unsigned int w) ...@@ -119,7 +119,7 @@ static inline unsigned int hweight32(unsigned int w)
{ {
unsigned int res; unsigned int res;
__asm__ ("%0.l = ONES %0;" __asm__ ("%0.l = ONES %1;"
"%0 = %0.l (Z);" "%0 = %0.l (Z);"
: "=d" (res) : "d" (w)); : "=d" (res) : "d" (w));
return res; return res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment