From 0733f4c9994db696420a405810d5f02c79ebc404 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sun, 22 Nov 2009 11:55:03 +0200 Subject: Make fastpos.h use tuklib_integer.h instead of bsr.h when --enable-small has been specified. --- src/liblzma/lzma/fastpos.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/liblzma/lzma') 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); } -- cgit v1.2.3