OSDN Git Service

add a_clz_64 helper function
authorSzabolcs Nagy <nsz@port70.net>
Tue, 18 Apr 2017 22:20:54 +0000 (00:20 +0200)
committerRich Felker <dalias@aerifal.cx>
Wed, 30 Aug 2017 01:47:10 +0000 (21:47 -0400)
commit06fbefd10046a0fae7e588b7c6d25fb51811b931
tree032c4ece67f6217ceb354ebff4c9889f2f0133eb
parent3356177979bea717451362e746252ed38de77514
add a_clz_64 helper function

counts leading zero bits of a 64bit int, undefined on zero input.
(has nothing to do with atomics, added to atomic.h so target specific
helper functions are together.)

there is a logarithmic generic implementation and another in terms of
a 32bit a_clz_32 on targets where that's available.
arch/aarch64/atomic_arch.h
arch/arm/atomic_arch.h
arch/i386/atomic_arch.h
arch/powerpc/atomic_arch.h
arch/powerpc64/atomic_arch.h
arch/x32/atomic_arch.h
arch/x86_64/atomic_arch.h
src/internal/atomic.h