From 2cc9c6942e390a6426105c90d4ff83eabbf240c9 Mon Sep 17 00:00:00 2001 From: ngiddings Date: Tue, 23 Aug 2022 08:46:34 -0500 Subject: [PATCH] Fixed call to __builtin_clz() ilog2() erroneously called __builtin_clzl() instead of __builtin_clz() --- src/math.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/math.c b/src/math.c index b8ec08e..5275c83 100644 --- a/src/math.c +++ b/src/math.c @@ -5,7 +5,7 @@ int ilog2(unsigned int x) #if defined __GNUC__ if(x <= 1) return 0; - return 32 - __builtin_clzl(x - 1); + return 32 - __builtin_clz(x - 1); #else static const int table[32] = { 0, 9, 1, 10, 13, 21, 2, 29,