Lines Matching full:word
101 * @word: value to rotate
104 static inline __u64 rol64(__u64 word, unsigned int shift) in rol64() argument
106 return (word << (shift & 63)) | (word >> ((-shift) & 63)); in rol64()
111 * @word: value to rotate
114 static inline __u64 ror64(__u64 word, unsigned int shift) in ror64() argument
116 return (word >> (shift & 63)) | (word << ((-shift) & 63)); in ror64()
121 * @word: value to rotate
124 static inline __u32 rol32(__u32 word, unsigned int shift) in rol32() argument
126 return (word << (shift & 31)) | (word >> ((-shift) & 31)); in rol32()
131 * @word: value to rotate
134 static inline __u32 ror32(__u32 word, unsigned int shift) in ror32() argument
136 return (word >> (shift & 31)) | (word << ((-shift) & 31)); in ror32()
141 * @word: value to rotate
144 static inline __u16 rol16(__u16 word, unsigned int shift) in rol16() argument
146 return (word << (shift & 15)) | (word >> ((-shift) & 15)); in rol16()
151 * @word: value to rotate
154 static inline __u16 ror16(__u16 word, unsigned int shift) in ror16() argument
156 return (word >> (shift & 15)) | (word << ((-shift) & 15)); in ror16()
161 * @word: value to rotate
164 static inline __u8 rol8(__u8 word, unsigned int shift) in rol8() argument
166 return (word << (shift & 7)) | (word >> ((-shift) & 7)); in rol8()
171 * @word: value to rotate
174 static inline __u8 ror8(__u8 word, unsigned int shift) in ror8() argument
176 return (word >> (shift & 7)) | (word << ((-shift) & 7)); in ror8()
232 * __ffs64 - find first set bit in a 64 bit word
233 * @word: The 64 bit word
236 * The result is not defined if no bits are set, so check that @word
239 static inline unsigned long __ffs64(u64 word) in __ffs64() argument
242 if (((u32)word) == 0UL) in __ffs64()
243 return __ffs((u32)(word >> 32)) + 32; in __ffs64()
247 return __ffs((unsigned long)word); in __ffs64()
251 * fns - find N'th set bit in a word
252 * @word: The word to search
255 static inline unsigned long fns(unsigned long word, unsigned int n) in fns() argument
259 while (word) { in fns()
260 bit = __ffs(word); in fns()
263 __clear_bit(bit, &word); in fns()