svn commit: r289820 - in stable/9/sys: amd64/include conf i386/include

Andriy Gapon avg at FreeBSD.org
Fri Oct 23 10:48:31 UTC 2015


Author: avg
Date: Fri Oct 23 10:48:29 2015
New Revision: 289820
URL: https://svnweb.freebsd.org/changeset/base/289820

Log:
  MFC r261891: provide fast versions of ffsl and flsl for i386; ffsll and
  flsll for amd64

Modified:
  stable/9/sys/amd64/include/cpufunc.h
  stable/9/sys/conf/files.arm
  stable/9/sys/conf/files.i386
  stable/9/sys/conf/files.ia64
  stable/9/sys/conf/files.mips
  stable/9/sys/conf/files.pc98
  stable/9/sys/conf/files.powerpc
  stable/9/sys/conf/files.sparc64
  stable/9/sys/i386/include/cpufunc.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/conf/   (props changed)

Modified: stable/9/sys/amd64/include/cpufunc.h
==============================================================================
--- stable/9/sys/amd64/include/cpufunc.h	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/amd64/include/cpufunc.h	Fri Oct 23 10:48:29 2015	(r289820)
@@ -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/9/sys/conf/files.arm
==============================================================================
--- stable/9/sys/conf/files.arm	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/conf/files.arm	Fri Oct 23 10:48:29 2015	(r289820)
@@ -68,6 +68,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/memchr.c		optional	fdt
 libkern/moddi3.c		standard

Modified: stable/9/sys/conf/files.i386
==============================================================================
--- stable/9/sys/conf/files.i386	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/conf/files.i386	Fri Oct 23 10:48:29 2015	(r289820)
@@ -522,8 +522,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/9/sys/conf/files.ia64
==============================================================================
--- stable/9/sys/conf/files.ia64	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/conf/files.ia64	Fri Oct 23 10:48:29 2015	(r289820)
@@ -126,6 +126,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/9/sys/conf/files.mips
==============================================================================
--- stable/9/sys/conf/files.mips	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/conf/files.mips	Fri Oct 23 10:48:29 2015	(r289820)
@@ -77,6 +77,7 @@ libkern/divdi3.c		optional	isa_mips32
 libkern/ffsl.c			standard
 libkern/fls.c			standard
 libkern/flsl.c			standard
+libkern/flsll.c			standard
 libkern/lshrdi3.c		standard
 libkern/memmove.c		standard
 libkern/moddi3.c		optional	isa_mips32

Modified: stable/9/sys/conf/files.pc98
==============================================================================
--- stable/9/sys/conf/files.pc98	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/conf/files.pc98	Fri Oct 23 10:48:29 2015	(r289820)
@@ -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/9/sys/conf/files.powerpc
==============================================================================
--- stable/9/sys/conf/files.powerpc	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/conf/files.powerpc	Fri Oct 23 10:48:29 2015	(r289820)
@@ -70,6 +70,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/memchr.c		optional	fdt
 libkern/memmove.c		standard

Modified: stable/9/sys/conf/files.sparc64
==============================================================================
--- stable/9/sys/conf/files.sparc64	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/conf/files.sparc64	Fri Oct 23 10:48:29 2015	(r289820)
@@ -67,6 +67,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/9/sys/i386/include/cpufunc.h
==============================================================================
--- stable/9/sys/i386/include/cpufunc.h	Fri Oct 23 10:39:43 2015	(r289819)
+++ stable/9/sys/i386/include/cpufunc.h	Fri Oct 23 10:48:29 2015	(r289820)
@@ -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


More information about the svn-src-stable-9 mailing list