using bsr even with no popcnt present (#852)

This commit is contained in:
Alden Torres 2016-06-24 17:43:29 -04:00 committed by Arvid Norberg
parent 9efba7d752
commit c84aceea3f
1 changed files with 4 additions and 7 deletions

View File

@ -76,8 +76,6 @@ namespace libtorrent
}
#if TORRENT_HAS_SSE
if (aux::mmx_support)
{
#ifdef __GNUC__
return ret + __builtin_clz(v);
#else
@ -85,7 +83,6 @@ namespace libtorrent
_BitScanReverse(&pos, v);
return ret + 31 - pos;
#endif
}
#else
// http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogObvious
static const int MultiplyDeBruijnBitPosition[32] =