]> git.baikalelectronics.ru Git - kernel.git/commit
x86: merge the simple bitops and move them to bitops.h
authorAlexander van Heukelum <heukelum@mailshack.com>
Sat, 15 Mar 2008 12:04:42 +0000 (13:04 +0100)
committerIngo Molnar <mingo@elte.hu>
Sat, 26 Apr 2008 17:21:16 +0000 (19:21 +0200)
commit5bcc1502e884ea0d58abdab7be5293c89542d96b
tree60affb5bdc5b857dfb3969234659caedbf2ff02a
parent2641be4bf53a7c9f0cac285ff15a987997faf59b
x86: merge the simple bitops and move them to bitops.h

Some of those can be written in such a way that the same
inline assembly can be used to generate both 32 bit and
64 bit code.

For ffs and fls, x86_64 unconditionally used the cmov
instruction and i386 unconditionally used a conditional
branch over a mov instruction. In the current patch I
chose to select the version based on the availability
of the cmov instruction instead. A small detail here is
that x86_64 did not previously set CONFIG_X86_CMOV=y.

Improved comments for ffs, ffz, fls and variations.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/Kconfig.cpu
include/asm-x86/bitops.h
include/asm-x86/bitops_32.h
include/asm-x86/bitops_64.h