Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103260552
D20250.id57452.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D20250.id57452.diff
View Options
Index: arm64/include/cpufunc.h
===================================================================
--- arm64/include/cpufunc.h
+++ arm64/include/cpufunc.h
@@ -38,6 +38,63 @@
#ifdef _KERNEL
+#define HAVE_INLINE_FFS
+
+static __inline __pure2 int
+ffs(int mask)
+{
+
+ return (__builtin_ffs(mask));
+}
+
+#define HAVE_INLINE_FFSL
+
+static __inline __pure2 int
+ffsl(long mask)
+{
+
+ return (__builtin_ffsl(mask));
+}
+
+#define HAVE_INLINE_FFSLL
+
+static __inline __pure2 int
+ffsll(long long mask)
+{
+
+ return (__builtin_ffsll(mask));
+}
+
+#define HAVE_INLINE_FLS
+
+static __inline __pure2 int
+fls(int mask)
+{
+
+ return (mask == 0 ? 0 :
+ 8 * sizeof(mask) - __builtin_clz((u_int)mask));
+}
+
+#define HAVE_INLINE_FLSL
+
+static __inline __pure2 int
+flsl(long mask)
+{
+
+ return (mask == 0 ? 0 :
+ 8 * sizeof(mask) - __builtin_clzl((u_long)mask));
+}
+
+#define HAVE_INLINE_FLSLL
+
+static __inline __pure2 int
+flsll(long long mask)
+{
+
+ return (mask == 0 ? 0 :
+ 8 * sizeof(mask) - __builtin_clzll((unsigned long long)mask));
+}
+
#include <machine/armreg.h>
void pan_enable(void);
Index: conf/files.arm64
===================================================================
--- conf/files.arm64
+++ conf/files.arm64
@@ -258,12 +258,6 @@
kern/subr_devmap.c standard
kern/subr_intr.c optional intrng
libkern/bcmp.c standard
-libkern/ffs.c standard
-libkern/ffsl.c standard
-libkern/ffsll.c standard
-libkern/fls.c standard
-libkern/flsl.c standard
-libkern/flsll.c standard
libkern/memcmp.c standard
libkern/memset.c standard
libkern/arm64/crc32c_armv8.S standard
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 6:29 PM (15 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14807563
Default Alt Text
D20250.id57452.diff (1 KB)
Attached To
Mode
D20250: Build arm64 kernel with inline ffs, fls
Attached
Detach File
Event Timeline
Log In to Comment