generic: Implement generic ffs/fls using __builtin_* functions
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 12 Sep 2012 21:00:53 +0000 (22:00 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 14 Sep 2012 16:15:41 +0000 (17:15 +0100)
commit048fa2df92c325cb4425dccd66c8922c8342b507
treea76ddbd3f05752f27e0867906a34e102cb76b4e4
parent0753f70f07fbbd23a48d61ffea37028bd0bd6c7d
generic: Implement generic ffs/fls using __builtin_* functions

This patch implements ffs, __ffs, fls, __fls using __builtin_* gcc
functions. These header files can be used by other architectures that
rely on the gcc builtins.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
include/asm-generic/bitops/builtin-__ffs.h [new file with mode: 0644]
include/asm-generic/bitops/builtin-__fls.h [new file with mode: 0644]
include/asm-generic/bitops/builtin-ffs.h [new file with mode: 0644]
include/asm-generic/bitops/builtin-fls.h [new file with mode: 0644]