On 02/05/14 11:26, Joseph S. Myers wrote:
On Wed, 5 Feb 2014, Jeff Law wrote:

However, it's pretty easy to avoid the headaches and just provide a popcount
routine.   I don't think this code is at all performance critical (once per
function being compiled), so a simple popcount should be sufficient.  No need
for lookup tables IMHO.

hwint.[ch] provide popcount_hwi, if HOST_WIDE_INT is a suitable type.
Even better.


(Personally I think there are lots of bits of standard integer
manipulation functionality, such as popcount, that are common in processor
instructions and compiler intrinsics, but could do with having bindings in
ISO C to provide a standard way to access that functionality.
Agreed.


Jeff

Reply via email to