diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2005-12-21 22:30:53 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-03 16:11:06 -0500 |
commit | 3821af2fe13700cab6fd67367128fa180e43f8b8 (patch) | |
tree | a70f63c24bd7d2ac8b25e3e4ee0ef6a50847aa67 /include/asm-arm | |
parent | c865e5d99e25a171e8262fc0f7ba608568633c64 (diff) |
[FLS64]: generic version
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/bitops.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-arm/bitops.h b/include/asm-arm/bitops.h index 7399d431edfe..d02de721ecc1 100644 --- a/include/asm-arm/bitops.h +++ b/include/asm-arm/bitops.h | |||
@@ -332,6 +332,7 @@ static inline unsigned long __ffs(unsigned long word) | |||
332 | */ | 332 | */ |
333 | 333 | ||
334 | #define fls(x) generic_fls(x) | 334 | #define fls(x) generic_fls(x) |
335 | #define fls64(x) generic_fls64(x) | ||
335 | 336 | ||
336 | /* | 337 | /* |
337 | * ffs: find first bit set. This is defined the same way as | 338 | * ffs: find first bit set. This is defined the same way as |
@@ -351,6 +352,7 @@ static inline unsigned long __ffs(unsigned long word) | |||
351 | #define fls(x) \ | 352 | #define fls(x) \ |
352 | ( __builtin_constant_p(x) ? generic_fls(x) : \ | 353 | ( __builtin_constant_p(x) ? generic_fls(x) : \ |
353 | ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) ) | 354 | ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) ) |
355 | #define fls64(x) generic_fls64(x) | ||
354 | #define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); }) | 356 | #define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); }) |
355 | #define __ffs(x) (ffs(x) - 1) | 357 | #define __ffs(x) (ffs(x) - 1) |
356 | #define ffz(x) __ffs( ~(x) ) | 358 | #define ffz(x) __ffs( ~(x) ) |