This source file includes following definitions.
- fls
1
2
3
4
5
6
7
8
9
10 #ifndef __UNICORE_BITOPS_H__
11 #define __UNICORE_BITOPS_H__
12
13 #define _ASM_GENERIC_BITOPS_FLS_H_
14 #define _ASM_GENERIC_BITOPS___FLS_H_
15 #define _ASM_GENERIC_BITOPS_FFS_H_
16 #define _ASM_GENERIC_BITOPS___FFS_H_
17
18
19
20
21
22 static inline int fls(unsigned int x)
23 {
24 int ret;
25
26 asm("cntlz\t%0, %1" : "=r" (ret) : "r" (x) : "cc");
27 ret = 32 - ret;
28
29 return ret;
30 }
31
32 #define __fls(x) (fls(x) - 1)
33 #define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); })
34 #define __ffs(x) (ffs(x) - 1)
35
36 #include <asm-generic/bitops.h>
37
38
39 #define find_next_bit find_next_bit
40 #define find_next_zero_bit find_next_zero_bit
41 #define find_first_bit find_first_bit
42 #define find_first_zero_bit find_first_zero_bit
43
44 #include <asm-generic/bitops/find.h>
45
46 #endif