Lines Matching +full:even +full:- +full:numbered
1 /* SPDX-License-Identifier: GPL-2.0 */
9 * Within a word, bits are numbered LSB first. Lot's of places make
12 * big-endian system because, unlike little endian, the number of each
16 * end up numbered:
20 * The bits are numbered:
23 * The main difference is that bit 0-63 in the bit number field needs to be
62 addr += (nr ^ (BITS_PER_LONG - BITS_PER_BYTE)) / BITS_PER_BYTE; in arch_test_bit()
63 mask = 1UL << (nr & (BITS_PER_BYTE - 1)); in arch_test_bit()
75 #include <asm-generic/bitops/atomic.h>
76 #include <asm-generic/bitops/non-instrumented-non-atomic.h>
77 #include <asm-generic/bitops/lock.h>
81 * The bits are numbered:
95 return set_bit(nr ^ (BITS_PER_LONG - 1), ptr); in set_bit_inv()
100 return clear_bit(nr ^ (BITS_PER_LONG - 1), ptr); in clear_bit_inv()
106 return test_and_clear_bit(nr ^ (BITS_PER_LONG - 1), ptr); in test_and_clear_bit_inv()
111 return __set_bit(nr ^ (BITS_PER_LONG - 1), ptr); in __set_bit_inv()
116 return __clear_bit(nr ^ (BITS_PER_LONG - 1), ptr); in __clear_bit_inv()
122 return test_bit(nr ^ (BITS_PER_LONG - 1), ptr); in test_bit_inv()
126 * __flogr - find leftmost one
127 * @word - The word to search
168 rp.even = word; in __flogr()
172 return rp.even; in __flogr()
177 * __ffs - find first bit in word.
184 return __flogr(-word & word) ^ (BITS_PER_LONG - 1); in __ffs()
188 * ffs - find first bit set
196 unsigned long mask = 2 * BITS_PER_LONG - 1; in ffs()
199 return (1 + (__flogr(-val & val) ^ (BITS_PER_LONG - 1))) & mask; in ffs()
203 * __fls - find last (most-significant) set bit in a long word
210 return __flogr(word) ^ (BITS_PER_LONG - 1); in __fls()
214 * fls64 - find last set bit in a 64-bit word
226 unsigned long mask = 2 * BITS_PER_LONG - 1; in fls64()
228 return (1 + (__flogr(word) ^ (BITS_PER_LONG - 1))) & mask; in fls64()
232 * fls - find last (most-significant) bit set
244 #include <asm-generic/bitops/const_hweight.h>
245 #include <asm-generic/bitops/ffz.h>
246 #include <asm-generic/bitops/sched.h>
247 #include <asm-generic/bitops/le.h>
248 #include <asm-generic/bitops/ext2-atomic-setbit.h>