Lines Matching +full:x +full:- +full:mask

2  * include/asm-xtensa/bitops.h
10 * Copyright (C) 2001 - 2007 Tensilica Inc.
24 #include <asm-generic/bitops/non-atomic.h>
28 static inline unsigned long __cntlz (unsigned long x) in __cntlz() argument
31 asm ("nsau %0, %1" : "=r" (lz) : "r" (x)); in __cntlz()
40 static inline int ffz(unsigned long x) in ffz() argument
42 return 31 - __cntlz(~x & -~x); in ffz()
49 static inline unsigned long __ffs(unsigned long x) in __ffs() argument
51 return 31 - __cntlz(x & -x); in __ffs()
60 static inline int ffs(unsigned long x) in ffs() argument
62 return 32 - __cntlz(x & -x); in ffs()
66 * fls: Find last (most-significant) bit set in word.
70 static inline int fls (unsigned int x) in fls() argument
72 return 32 - __cntlz(x); in fls()
76 * __fls - find last (most-significant) set bit in a long word
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>
105 unsigned long mask = 1UL << (bit & 31); \
111 " "insn" %[tmp], %[tmp], %[mask]\n" \
116 : [mask] "a" (inv mask), [addr] "a" (p) \
125 unsigned long mask = 1UL << (bit & 31); \
131 " "insn" %[tmp], %[value], %[mask]\n" \
136 : [mask] "a" (inv mask), [addr] "a" (p) \
139 return value & mask; \
148 unsigned long mask = 1UL << (bit & 31); \
155 " "insn" %[tmp], %[value], %[mask]\n" \
160 : [mask] "a" (inv mask) \
169 unsigned long mask = 1UL << (bit & 31); \
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>