mirror of https://git.tukaani.org/xz.git
liblzma: memcmplen: Use ctz32() from tuklib_integer.h.
The same compiler-specific #ifdefs are already in tuklib_integer.h
This commit is contained in:
parent
412791486d
commit
94aa3fb568
|
@ -99,15 +99,7 @@ lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2,
|
||||||
_mm_loadu_si128((const __m128i *)(buf2 + len))));
|
_mm_loadu_si128((const __m128i *)(buf2 + len))));
|
||||||
|
|
||||||
if (x != 0) {
|
if (x != 0) {
|
||||||
# if defined(__INTEL_COMPILER)
|
len += ctz32(x);
|
||||||
len += _bit_scan_forward(x);
|
|
||||||
# elif defined(_MSC_VER)
|
|
||||||
unsigned long tmp;
|
|
||||||
_BitScanForward(&tmp, x);
|
|
||||||
len += tmp;
|
|
||||||
# else
|
|
||||||
len += __builtin_ctz(x);
|
|
||||||
# endif
|
|
||||||
return my_min(len, limit);
|
return my_min(len, limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue