Date: Tue, 28 Jul 2020 07:04:46 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r363633 - stable/12/sys/amd64/include Message-ID: <202007280704.06S74kDK094259@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Tue Jul 28 07:04:46 2020 New Revision: 363633 URL: https://svnweb.freebsd.org/changeset/base/363633 Log: MFC r363242: amd64: patch ffsl to use the compiler builtin Modified: stable/12/sys/amd64/include/cpufunc.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/include/cpufunc.h ============================================================================== --- stable/12/sys/amd64/include/cpufunc.h Tue Jul 28 04:58:01 2020 (r363632) +++ stable/12/sys/amd64/include/cpufunc.h Tue Jul 28 07:04:46 2020 (r363633) @@ -167,7 +167,8 @@ enable_intr(void) static __inline __pure2 int ffsl(long mask) { - return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1); + + return (__builtin_ffsl(mask)); } #define HAVE_INLINE_FFSLL
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007280704.06S74kDK094259>