count-one-bits: port to MSC; support types wider than 64 bits
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 7 Oct 2013 06:43:43 +0000 (23:43 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 7 Oct 2013 07:03:00 +0000 (00:03 -0700)
commit75588b6ed2692b86b760b5390a33d380d642c925
treec35c6dc59f707aeea76644fdab45ef08c7218417
parent98171ec274fdcd518baf812ad0dd8933d2eee8ee
count-one-bits: port to MSC; support types wider than 64 bits

The ideas behind the MSC port are stolen from Emacs.
* lib/count-one-bits.c (popcount_support) [_MSC_VER]: New variable.
* lib/count-one-bits.h: Include limits.h, for CHAR_BIT.
Don't include verify.h: it's no longer needed, as types wider than
64 bits are now supported.
(COUNT_ONE_BITS_GENERIC): New macro.
(popcount_supported) [_MSC_VER]: New inline function.
(COUNT_ONE_BITS): Use it.  New arg MSC_BUILTIN, for better
performance with MSC.  All uses changed.  Do not assume that TYPE
has at most 64 bits.
* modules/count-one-bits (Depends-on): Do not depend on 'verify'.
ChangeLog
lib/count-one-bits.c
lib/count-one-bits.h
modules/count-one-bits