Implement ffs(3) using the CLZ instructions which has been available ever
authorkettenis <kettenis@openbsd.org>
Sun, 21 Jan 2018 21:56:02 +0000 (21:56 +0000)
committerkettenis <kettenis@openbsd.org>
Sun, 21 Jan 2018 21:56:02 +0000 (21:56 +0000)
commita30f7a9e94849b1631dd36f5f71d1b559399f2c1
treef82f0b4d0cf2bcae1f3b04332e38450f24aa5ebe
parented071b0940df7d49c825eacaea10c51a2caa1552
Implement ffs(3) using the CLZ instructions which has been available ever
since ARMv5.  Should be much faster but more importantly it removes the
data table from .text which could introduce unwanted ROP gadgets.

Based on changes in Android/Bionic by Elliott Hughes.

ok patrick@
lib/libc/arch/arm/string/ffs.S