Lines Matching +full:bit +full:- +full:mask
2 * include/asm-xtensa/bitops.h
10 * Copyright (C) 2001 - 2007 Tensilica Inc.
24 #include <asm-generic/bitops/non-atomic.h>
37 * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
42 return 31 - __cntlz(~x & -~x); in ffz()
46 * __ffs: Find first bit set in word. Return 0 for bit 0
51 return 31 - __cntlz(x & -x); in __ffs()
55 * ffs: Find first bit set in word. This is defined the same way as
62 return 32 - __cntlz(x & -x); in ffs()
66 * fls: Find last (most-significant) bit set in word.
72 return 32 - __cntlz(x); in fls()
76 * __fls - find last (most-significant) set bit in a long word
79 * Undefined if no set bit exists, so code should check against 0 first.
83 return 31 - __cntlz(word); in __fls()
89 # include <asm-generic/bitops/ffs.h>
90 # include <asm-generic/bitops/__ffs.h>
91 # include <asm-generic/bitops/ffz.h>
92 # include <asm-generic/bitops/fls.h>
93 # include <asm-generic/bitops/__fls.h>
97 #include <asm-generic/bitops/fls64.h>
102 static inline void arch_##op##_bit(unsigned int bit, volatile unsigned long *p)\
105 unsigned long mask = 1UL << (bit & 31); \
107 p += bit >> 5; \
111 " "insn" %[tmp], %[tmp], %[mask]\n" \
116 : [mask] "a" (inv mask), [addr] "a" (p) \
122 arch_test_and_##op##_bit(unsigned int bit, volatile unsigned long *p) \
125 unsigned long mask = 1UL << (bit & 31); \
127 p += bit >> 5; \
131 " "insn" %[tmp], %[value], %[mask]\n" \
136 : [mask] "a" (inv mask), [addr] "a" (p) \
139 return value & mask; \
145 static inline void arch_##op##_bit(unsigned int bit, volatile unsigned long *p)\
148 unsigned long mask = 1UL << (bit & 31); \
150 p += bit >> 5; \
155 " "insn" %[tmp], %[value], %[mask]\n" \
160 : [mask] "a" (inv mask) \
166 arch_test_and_##op##_bit(unsigned int bit, volatile unsigned long *p) \
169 unsigned long mask = 1UL << (bit & 31); \
171 p += bit >> 5; \
176 " "insn" %[tmp], %[value], %[mask]\n" \
181 : [mask] "a" (inv mask) \
184 return tmp & mask; \
192 #include <asm-generic/bitops/atomic.h>
208 #include <asm-generic/bitops/instrumented-atomic.h>
210 #include <asm-generic/bitops/le.h>
212 #include <asm-generic/bitops/ext2-atomic-setbit.h>
214 #include <asm-generic/bitops/hweight.h>
215 #include <asm-generic/bitops/lock.h>
216 #include <asm-generic/bitops/sched.h>