]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
illums compat: use flsl/flsll for highbit/highbit64
authorAndriy Gapon <avg@FreeBSD.org>
Fri, 19 Jun 2015 06:41:53 +0000 (06:41 +0000)
committerAndriy Gapon <avg@FreeBSD.org>
Fri, 19 Jun 2015 06:41:53 +0000 (06:41 +0000)
commitab50c99d40525cf5422f46525a31bf18380c0104
tree78c5fe18a0c02f0b96779e1e18ccb78b058f9b33
parentbda8af6860978f3d8c8c08fb66fd5f1564a26793
illums compat: use flsl/flsll for highbit/highbit64

Do that only when when fast inline versions are available.
At the moment that can be the case only in the kernel and not for all
platforms.

The original code uses the binary search and that's kept as a fallback.
This is a micro optimization.

Differential Revision: https://reviews.freebsd.org/D2839
Reviewed by: delphij, mahrens, mav
MFC after: 17 days
sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h