Lines Matching full:word

9  * Within a word, bits are numbered LSB first.  Lot's of places make
11 * This can cause confusion for large (> 1 word) bitmaps on a
13 * bit depends on the word size.
256 * @word - The word to search
262 static inline unsigned char __flogr(unsigned long word) in __flogr() argument
264 if (__builtin_constant_p(word)) { in __flogr()
267 if (!word) in __flogr()
269 if (!(word & 0xffffffff00000000UL)) { in __flogr()
270 word <<= 32; in __flogr()
273 if (!(word & 0xffff000000000000UL)) { in __flogr()
274 word <<= 16; in __flogr()
277 if (!(word & 0xff00000000000000UL)) { in __flogr()
278 word <<= 8; in __flogr()
281 if (!(word & 0xf000000000000000UL)) { in __flogr()
282 word <<= 4; in __flogr()
285 if (!(word & 0xc000000000000000UL)) { in __flogr()
286 word <<= 2; in __flogr()
289 if (!(word & 0x8000000000000000UL)) { in __flogr()
290 word <<= 1; in __flogr()
297 rp.even = word; in __flogr()
306 * __ffs - find first bit in word.
307 * @word: The word to search
311 static inline unsigned long __ffs(unsigned long word) in __ffs() argument
313 return __flogr(-word & word) ^ (BITS_PER_LONG - 1); in __ffs()
318 * @word: the word to search
323 static inline int ffs(int word) in ffs() argument
326 unsigned int val = (unsigned int)word; in ffs()
332 * __fls - find last (most-significant) set bit in a long word
333 * @word: the word to search
337 static inline unsigned long __fls(unsigned long word) in __fls() argument
339 return __flogr(word) ^ (BITS_PER_LONG - 1); in __fls()
343 * fls64 - find last set bit in a 64-bit word
344 * @word: the word to search
353 static inline int fls64(unsigned long word) in fls64() argument
357 return (1 + (__flogr(word) ^ (BITS_PER_LONG - 1))) & mask; in fls64()
362 * @word: the word to search
367 static inline int fls(unsigned int word) in fls() argument
369 return fls64(word); in fls()