X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Futil.h;h=4e2b2a7d745db3f72754d65246d1b97bad36ec79;hb=2a4ca27c2659dbe5b07f7c1faa301bce17704ec3;hp=91dc0a58d4aa88a336d1c8da49f9946632e3434f;hpb=d43d314e62b9791d1b9c13595a13fd6a851f856e;p=sliver-openvswitch.git diff --git a/lib/util.h b/lib/util.h index 91dc0a58d..4e2b2a7d7 100644 --- a/lib/util.h +++ b/lib/util.h @@ -287,7 +287,7 @@ void ignore(bool x OVS_UNUSED); int log_2_floor(uint32_t); int log_2_ceil(uint32_t); -unsigned int popcount(uint32_t); +unsigned int popcount(uint64_t); /* Returns the number of trailing 0-bits in 'n'. Undefined if 'n' == 0. */ #if __GNUC__ >= 4 @@ -306,21 +306,6 @@ raw_ctz(uint64_t n) int raw_ctz(uint64_t n); #endif -#if __GNUC__ >= 4 -static inline int -popcount64(uint64_t n) -{ - return __builtin_popcountll(n); -} -#else -/* Defined using the 32-bit counterparts. */ -static inline int -popcount64(uint64_t n) -{ - return popcount(n) + popcount(n >> 32); -} -#endif - /* Returns the number of trailing 0-bits in 'n', or 32 if 'n' is 0. */ static inline int ctz(uint32_t n)