HomeFreeBSD

lib/libc/string: replace ffs/fls implementations with clang builtins

Description

lib/libc/string: replace ffs/fls implementations with clang builtins

Most architectures we support (except for riscv64) have instructions
to compute these functions very quickly. Replace old code with the
ffs and clz builtin functions, allowing clang to generate good code
for all architectures.

As a consequence, toss out arm and i386 ffs() implementations.

Sponsored by: FreeBSD Foundation
Approved by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D40730