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/core | |
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/core')
-rw-r--r-- | src/core/bitops.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/core/bitops.c b/src/core/bitops.c deleted file mode 100644 index 1bca9e47..00000000 --- a/src/core/bitops.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <strings.h> - -FILE_LICENCE ( GPL2_OR_LATER ); - -int __flsl ( long x ) { - unsigned long value = x; - int ls = 0; - - for ( ls = 0 ; value ; ls++ ) { - value >>= 1; - } - return ls; -} |