[ovs-dev] [PATCH v4 5/6] lib/util: Add clz32() and clz64().

Jarno Rajahalme jrajahalme at nicira.com
Tue Dec 3 22:57:00 UTC 2013


On Dec 3, 2013, at 8:31 AM, Ben Pfaff <blp at nicira.com> wrote:

> On Tue, Nov 26, 2013 at 11:24:51AM -0800, Jarno Rajahalme wrote:
>> Count leading zeroes using builtin if available.
>> 
>> Make log_2_floor() use raw_clz() and inline log_2_floor() and
>> log_2_ceil().
>> 
>> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
> 
> I assume you tested both implementations of raw_clz64()?
> 

Yes, by manually changing the GCC detection tests (so that they fail) above these both in util.c and util.h.

> Acked-by: Ben Pfaff <blp at nicira.com>

Pushed to master,

  Jarno


More information about the dev mailing list