aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lzma/fastpos.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-11-22 11:55:03 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-11-22 11:55:03 +0200
commit0733f4c9994db696420a405810d5f02c79ebc404 (patch)
tree467ab8c4b568c12c597eb8792836745f2a085300 /src/liblzma/lzma/fastpos.h
parentUpdate tuklib_integer.h with bit scan functions. (diff)
downloadxz-0733f4c9994db696420a405810d5f02c79ebc404.tar.xz
Make fastpos.h use tuklib_integer.h instead of bsr.h
when --enable-small has been specified.
Diffstat (limited to 'src/liblzma/lzma/fastpos.h')
-rw-r--r--src/liblzma/lzma/fastpos.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/liblzma/lzma/fastpos.h b/src/liblzma/lzma/fastpos.h
index a95a00c4..4aea2318 100644
--- a/src/liblzma/lzma/fastpos.h
+++ b/src/liblzma/lzma/fastpos.h
@@ -76,15 +76,12 @@
// slightly faster, but sometimes it is a lot slower.
#ifdef HAVE_SMALL
-# include "bsr.h"
-
# define get_pos_slot(pos) ((pos) <= 4 ? (pos) : get_pos_slot_2(pos))
static inline uint32_t
get_pos_slot_2(uint32_t pos)
{
- uint32_t i;
- lzma_bsr(i, pos);
+ const uint32_t i = bsr32(pos);
return (i + i) + ((pos >> (i - 1)) & 1);
}