Re: svn commit: r347484 - head/sys/kern

2019-05-12 Thread Bruce Evans
On Sat, 11 May 2019, Doug Moore wrote: On 5/11/19 5:52 AM, Bruce Evans wrote: On Sat, 11 May 2019, Doug Moore wrote: +#ifdef HAVE_INLINE_FFS +?? case sizeof(int): +?? return (ffs(mask) - 1); +#endif This is unreachable, since sizeof(int) is 4 on all supported arches, and size

Re: svn commit: r347484 - head/sys/kern

2019-05-11 Thread Doug Moore
On 5/11/19 5:52 AM, Bruce Evans wrote: > On Sat, 11 May 2019, Doug Moore wrote: >> +#ifdef HAVE_INLINE_FFS >> +    case sizeof(int): >> +    return (ffs(mask) - 1); >> +#endif > > This is unreachable, since sizeof(int) is 4 on all supported arches, and > sizeof(mask) is 8 on all arches. > Anoth

Re: svn commit: r347484 - head/sys/kern

2019-05-11 Thread Bruce Evans
On Sat, 11 May 2019, Doug Moore wrote: Log: When bitpos can't be implemented with an inline ffs* instruction, change the binary search so that it does not depend on a single bit only being set in the bitmask. Use bitpos more generally, and avoid some clearing of bits to accommodate its curre

svn commit: r347484 - head/sys/kern

2019-05-11 Thread Doug Moore
Author: dougm Date: Sat May 11 09:09:10 2019 New Revision: 347484 URL: https://svnweb.freebsd.org/changeset/base/347484 Log: When bitpos can't be implemented with an inline ffs* instruction, change the binary search so that it does not depend on a single bit only being set in the bitmask. Us