diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2018-07-25 06:38:54 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2018-07-30 13:45:53 +0300 |
commit | 001a30c4d0e871b21d296e1bcafc6756a1b10607 (patch) | |
tree | 513df3ef85de8da961ce9416a8714cbce91c30ce /arch/arm/kernel/sys_oabi-compat.c | |
parent | cbfc5619e0cc8dcdf3020e27426eec362307cc14 (diff) | |
download | linux-001a30c4d0e871b21d296e1bcafc6756a1b10607.tar.xz |
ARM: 8785/1: use compiler built-ins for ffs and fls
On ARMv5 and above, it is beneficial to use compiler built-ins such as
__builtin_ffs() and __builtin_ctzl() to implement ffs(), __ffs(), fls()
and __fls(). The compiler does inline the clz instruction and even the
rbit instruction when available, or provide a constant value when
possible. On ARMv4 the compiler calls out to helper functions for those
built-ins so it is best to keep the open coded versions in that case.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/kernel/sys_oabi-compat.c')
0 files changed, 0 insertions, 0 deletions