Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105990241
D22340.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
D22340.diff
View Options
Index: head/stand/powerpc/kboot/main.c
===================================================================
--- head/stand/powerpc/kboot/main.c
+++ head/stand/powerpc/kboot/main.c
@@ -31,7 +31,6 @@
#include <sys/param.h>
#include <fdt_platform.h>
-#define _KERNEL
#include <machine/cpufunc.h>
#include "bootstrap.h"
#include "host_syscall.h"
Index: head/sys/conf/files.powerpc
===================================================================
--- head/sys/conf/files.powerpc
+++ head/sys/conf/files.powerpc
@@ -88,8 +88,6 @@
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/lshrdi3.c optional powerpc | powerpcspe
libkern/memcmp.c standard
Index: head/sys/powerpc/include/cpufunc.h
===================================================================
--- head/sys/powerpc/include/cpufunc.h
+++ head/sys/powerpc/include/cpufunc.h
@@ -212,6 +212,20 @@
return (ret);
}
+#define HAVE_INLINE_FLS
+static __inline __pure2 int
+fls(int mask)
+{
+ return (mask ? 32 - __builtin_clz(mask) : 0);
+}
+
+#define HAVE_INLINE_FLSL
+static __inline __pure2 int
+flsl(long mask)
+{
+ return (mask ? (8 * sizeof(long) - __builtin_clzl(mask)) : 0);
+}
+
/* "NOP" operations to signify priorities to the kernel. */
static __inline void
nop_prio_vlow(void)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 1:50 PM (19 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15588310
Default Alt Text
D22340.diff (1 KB)
Attached To
Mode
D22340: powerpc: Use builtins for fls/flsl
Attached
Detach File
Event Timeline
Log In to Comment