lkml.org 
[lkml]   [1998]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: patch parport/bitops
   Date: 	Fri, 24 Apr 1998 19:27:20 +0200
From: Thomas Sailer <sailer@ife.ee.ethz.ch>

hweight32/hweight16/hweight8 these count the number
of bits set in an N-bit word. The reason why I believe this
should be in an arch specific directory is because
most archs (other than i386, sparc pre v9 popc enhanced)
have instructions to do this. The reason there are 3 funcs
to do this is because the generic implementation is slightly
costly and the cost is lower with less bits.

No actual Sparc-V9 implementations, even UltraSparc, implement the
popc instruction in hardware, it must be emulated via software trap on
the "unimp" exception on all chips. Yes, this ticked me off too
because you can do ffz in constant time with that toy ;-)

Later,
David S. Miller
davem@dm.cobaltmicro.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.088 / U:4.744 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site