From owner-svn-src-all@freebsd.org Fri Oct 23 10:05:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A66FA1CE1C; Fri, 23 Oct 2015 10:05:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6918E65E; Fri, 23 Oct 2015 10:05:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NA5ich020505; Fri, 23 Oct 2015 10:05:44 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NA5hwr020494; Fri, 23 Oct 2015 10:05:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510231005.t9NA5hwr020494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 10:05:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289818 - in stable/10/sys: amd64/include conf i386/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Oct 2015 10:05:45 -0000 Author: avg Date: Fri Oct 23 10:05:43 2015 New Revision: 289818 URL: https://svnweb.freebsd.org/changeset/base/289818 Log: MFC r261891: provide fast versions of ffsl and flsl for i386; ffsll and flsll for amd64 Modified: stable/10/sys/amd64/include/cpufunc.h stable/10/sys/conf/files stable/10/sys/conf/files.arm stable/10/sys/conf/files.i386 stable/10/sys/conf/files.ia64 stable/10/sys/conf/files.mips stable/10/sys/conf/files.pc98 stable/10/sys/conf/files.powerpc stable/10/sys/conf/files.sparc64 stable/10/sys/i386/include/cpufunc.h Modified: stable/10/sys/amd64/include/cpufunc.h ============================================================================== --- stable/10/sys/amd64/include/cpufunc.h Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/amd64/include/cpufunc.h Fri Oct 23 10:05:43 2015 (r289818) @@ -154,6 +154,14 @@ ffsl(long mask) return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1); } +#define HAVE_INLINE_FFSLL + +static __inline int +ffsll(long long mask) +{ + return (ffsl((long)mask)); +} + #define HAVE_INLINE_FLS static __inline int @@ -170,6 +178,14 @@ flsl(long mask) return (mask == 0 ? mask : (int)bsrq((u_long)mask) + 1); } +#define HAVE_INLINE_FLSLL + +static __inline int +flsll(long long mask) +{ + return (flsl((long)mask)); +} + #endif /* _KERNEL */ static __inline void Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files Fri Oct 23 10:05:43 2015 (r289818) @@ -3219,7 +3219,6 @@ libkern/asprintf.c standard libkern/bcd.c standard libkern/bsearch.c standard libkern/crc32.c standard -libkern/flsll.c standard libkern/fnmatch.c standard libkern/iconv.c optional libiconv libkern/iconv_converter_if.m optional libiconv Modified: stable/10/sys/conf/files.arm ============================================================================== --- stable/10/sys/conf/files.arm Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files.arm Fri Oct 23 10:05:43 2015 (r289818) @@ -92,6 +92,7 @@ libkern/divdi3.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/lshrdi3.c standard libkern/moddi3.c standard libkern/qdivrem.c standard Modified: stable/10/sys/conf/files.i386 ============================================================================== --- stable/10/sys/conf/files.i386 Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files.i386 Fri Oct 23 10:05:43 2015 (r289818) @@ -538,8 +538,7 @@ kern/imgact_aout.c optional compat_aout kern/imgact_binmisc.c optional imagact_binmisc kern/imgact_gzip.c optional gzip libkern/divdi3.c standard -libkern/ffsl.c standard -libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard libkern/memset.c standard libkern/moddi3.c standard Modified: stable/10/sys/conf/files.ia64 ============================================================================== --- stable/10/sys/conf/files.ia64 Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files.ia64 Fri Oct 23 10:05:43 2015 (r289818) @@ -121,6 +121,7 @@ libkern/bcmp.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/ia64/__divdi3.S standard libkern/ia64/__divsi3.S standard libkern/ia64/__moddi3.S standard Modified: stable/10/sys/conf/files.mips ============================================================================== --- stable/10/sys/conf/files.mips Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files.mips Fri Oct 23 10:05:43 2015 (r289818) @@ -56,6 +56,7 @@ kern/subr_dummy_vdso_tc.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard libkern/cmpdi2.c optional mips | mipsel libkern/ucmpdi2.c optional mips | mipsel Modified: stable/10/sys/conf/files.pc98 ============================================================================== --- stable/10/sys/conf/files.pc98 Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files.pc98 Fri Oct 23 10:05:43 2015 (r289818) @@ -210,8 +210,7 @@ kern/kern_clocksource.c standard kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip libkern/divdi3.c standard -libkern/ffsl.c standard -libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard libkern/memset.c standard libkern/moddi3.c standard Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files.powerpc Fri Oct 23 10:05:43 2015 (r289818) @@ -83,6 +83,7 @@ libkern/ffs.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/lshrdi3.c optional powerpc libkern/memmove.c standard libkern/memset.c standard Modified: stable/10/sys/conf/files.sparc64 ============================================================================== --- stable/10/sys/conf/files.sparc64 Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files.sparc64 Fri Oct 23 10:05:43 2015 (r289818) @@ -69,6 +69,7 @@ libkern/ffs.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard sparc64/central/central.c optional central sparc64/ebus/ebus.c optional ebus Modified: stable/10/sys/i386/include/cpufunc.h ============================================================================== --- stable/10/sys/i386/include/cpufunc.h Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/i386/include/cpufunc.h Fri Oct 23 10:05:43 2015 (r289818) @@ -184,6 +184,14 @@ ffs(int mask) return (mask == 0 ? mask : (int)bsfl((u_int)mask) + 1); } +#define HAVE_INLINE_FFSL + +static __inline int +ffsl(long mask) +{ + return (ffs((int)mask)); +} + #define HAVE_INLINE_FLS static __inline int @@ -192,6 +200,14 @@ fls(int mask) return (mask == 0 ? mask : (int)bsrl((u_int)mask) + 1); } +#define HAVE_INLINE_FLSL + +static __inline int +flsl(long mask) +{ + return (fls((int)mask)); +} + #endif /* _KERNEL */ static __inline void