diff options
| author | Michael Brown | 2014-04-24 15:49:08 +0200 |
|---|---|---|
| committer | Michael Brown | 2014-04-24 15:49:08 +0200 |
| commit | dce7107fc087092dc95b420504b26261933d5f73 (patch) | |
| tree | 19f2d2d874fcaede9cfe98a52d362cd1b21e2822 /src/core | |
| parent | [test] Add self-tests for flsl() (diff) | |
| download | ipxe-dce7107fc087092dc95b420504b26261933d5f73.tar.gz ipxe-dce7107fc087092dc95b420504b26261933d5f73.tar.xz ipxe-dce7107fc087092dc95b420504b26261933d5f73.zip | |
[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 1bca9e47b..000000000 --- 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; -} |
