« Previous | Next » 

Revision fbeadf50

IDfbeadf50f2f965741def823036b086bbc2999b1f

Added by Paolo Bonzini about 11 years ago

bitops: unify bitops_ffsl with the one in host-utils.h, call it bitops_ctzl

We had two copies of a ffs function for longs with subtly different
semantics and, for the one in bitops.h, a confusing name: the result
was off-by-one compared to the library function ffsl.

Unify the functions into one, and solve the name problem by calling
the 0-based functions "bitops_ctzl" and "bitops_ctol" respectively.

This also fixes the build on platforms with ffsl, including Mac OS X
and Windows.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Eric Blake <>
Tested-by: Andreas Färber <>
Tested-by: Peter Maydell <>
Signed-off-by: Blue Swirl <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences