Lines Matching refs:x
27 static inline __attribute__ ((const)) int clz(unsigned int x) in clz() argument
36 : "r"(x) in clz()
42 static inline int constant_fls(unsigned int x) in constant_fls() argument
46 if (!x) in constant_fls()
48 if (!(x & 0xffff0000u)) { in constant_fls()
49 x <<= 16; in constant_fls()
52 if (!(x & 0xff000000u)) { in constant_fls()
53 x <<= 8; in constant_fls()
56 if (!(x & 0xf0000000u)) { in constant_fls()
57 x <<= 4; in constant_fls()
60 if (!(x & 0xc0000000u)) { in constant_fls()
61 x <<= 2; in constant_fls()
64 if (!(x & 0x80000000u)) in constant_fls()
74 static inline __attribute__ ((const)) int fls(unsigned int x) in fls() argument
76 if (__builtin_constant_p(x)) in fls()
77 return constant_fls(x); in fls()
79 return 32 - clz(x); in fls()
85 static inline __attribute__ ((const)) unsigned long __fls(unsigned long x) in __fls() argument
87 if (!x) in __fls()
90 return fls(x) - 1; in __fls()
97 #define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); }) argument
117 static inline __attribute__ ((const)) int fls(unsigned int x) in fls() argument
125 : "r"(x) in fls()
134 static inline __attribute__ ((const)) unsigned long __fls(unsigned long x) in __fls() argument
137 return __builtin_arc_fls(x); in __fls()
144 static inline __attribute__ ((const)) int ffs(unsigned int x) in ffs() argument
153 : "r"(x) in ffs()
162 static inline __attribute__ ((const)) unsigned long __ffs(unsigned long x) in __ffs() argument
170 : "r"(x) in __ffs()
183 #define ffz(x) __ffs(~(x)) argument