diff options
author | Conrad Meyer <cem@FreeBSD.org> | 2019-11-06 06:42:00 +0000 |
---|---|---|
committer | Conrad Meyer <cem@FreeBSD.org> | 2019-11-06 06:42:00 +0000 |
commit | ea68403922c3b53b00fc999fcb3eaef1feb50177 (patch) | |
tree | 9870b0c695852e26fb9f8e19df8d7f5cb6616141 /lib/legacy/zstd_v06.c | |
parent | 90f4bdbe917eaf678feca2b0ff9647b5ae8bbb9d (diff) |
Diffstat (limited to 'lib/legacy/zstd_v06.c')
-rw-r--r-- | lib/legacy/zstd_v06.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/legacy/zstd_v06.c b/lib/legacy/zstd_v06.c index f907a3a71226..2a08e8dee842 100644 --- a/lib/legacy/zstd_v06.c +++ b/lib/legacy/zstd_v06.c @@ -860,7 +860,7 @@ MEM_STATIC unsigned BITv06_highbit32 ( U32 val) _BitScanReverse ( &r, val ); return (unsigned) r; # elif defined(__GNUC__) && (__GNUC__ >= 3) /* Use GCC Intrinsic */ - return 31 - __builtin_clz (val); + return __builtin_clz (val) ^ 31; # else /* Software version */ static const unsigned DeBruijnClz[32] = { 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31 }; U32 v = val; |