Lines Matching defs: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.
266 * @word - The word to search
272 static inline unsigned char __flogr(unsigned long word)
274 if (__builtin_constant_p(word)) {
277 if (!word)
279 if (!(word & 0xffffffff00000000UL)) {
280 word <<= 32;
283 if (!(word & 0xffff000000000000UL)) {
284 word <<= 16;
287 if (!(word & 0xff00000000000000UL)) {
288 word <<= 8;
291 if (!(word & 0xf000000000000000UL)) {
292 word <<= 4;
295 if (!(word & 0xc000000000000000UL)) {
296 word <<= 2;
299 if (!(word & 0x8000000000000000UL)) {
300 word <<= 1;
307 rp.even = word;
316 * __ffs - find first bit in word.
317 * @word: The word to search
321 static inline unsigned long __ffs(unsigned long word)
323 return __flogr(-word & word) ^ (BITS_PER_LONG - 1);
328 * @word: the word to search
333 static inline int ffs(int word)
336 unsigned int val = (unsigned int)word;
342 * __fls - find last (most-significant) set bit in a long word
343 * @word: the word to search
347 static inline unsigned long __fls(unsigned long word)
349 return __flogr(word) ^ (BITS_PER_LONG - 1);
353 * fls64 - find last set bit in a 64-bit word
354 * @word: the word to search
363 static inline int fls64(unsigned long word)
367 return (1 + (__flogr(word) ^ (BITS_PER_LONG - 1))) & mask;
372 * @word: the word to search
377 static inline int fls(unsigned int word)
379 return fls64(word);