diff options
author | Michael Brown <mcb30@ipxe.org> | 2014-04-24 14:49:08 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2014-04-24 14:49:08 +0100 |
commit | dce7107fc087092dc95b420504b26261933d5f73 (patch) | |
tree | 19f2d2d874fcaede9cfe98a52d362cd1b21e2822 /src/include/strings.h | |
parent | 8f0e0e135670f19ee2b2f6e4ab2ab997ebd543a3 (diff) | |
download | ipxe-dce7107fc087092dc95b420504b26261933d5f73.tar.gz |
[libc] Add inline assembly implementation of flsl() using BSR instruction
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/strings.h')
-rw-r--r-- | src/include/strings.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/strings.h b/src/include/strings.h index c7063d682..924a084fc 100644 --- a/src/include/strings.h +++ b/src/include/strings.h @@ -5,6 +5,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <limits.h> #include <string.h> +#include <bits/strings.h> static inline __attribute__ (( always_inline )) int __constant_flsl ( unsigned long x ) { @@ -42,8 +43,7 @@ __constant_flsl ( unsigned long x ) { return r; } -/* We don't actually have these functions yet */ -extern int __flsl ( long x ); +int __flsl ( long x ); #define flsl( x ) \ ( __builtin_constant_p ( x ) ? __constant_flsl ( x ) : __flsl ( x ) ) |