diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2009-11-22 11:55:03 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2009-11-22 11:55:03 +0200 |
commit | 0733f4c9994db696420a405810d5f02c79ebc404 (patch) | |
tree | 467ab8c4b568c12c597eb8792836745f2a085300 /src/liblzma/lzma/fastpos.h | |
parent | Update tuklib_integer.h with bit scan functions. (diff) | |
download | xz-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.h | 5 |
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); } |