On Thu, Jan 26, 2006 at 08:55:41AM +0000, Russell King wrote: > Unfortunately that's not correct. You do not appear to have checked > the compiler output like I did - this code does _not_ generate > constant shifts. Russell, By "written stupidly", I thought Richard meant they could have used constants instead of "s". e.g.: if (word << 16 == 0) { b += 16; word >>= 16); } if (word << 24 == 0) { b += 8; word >>= 8); } if (word << 28 == 0) { b += 4; word >>= 4); } But I prefer what Edgar Toernig suggested. grant - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: Russell King <rmk+lkml@arm.linux.org.uk>
- Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: Nicolas Pitre <nico@cam.org>
- Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- References:
- [PATCH 0/6] RFC: use include/asm-generic/bitops.h
- From: mita@miraclelinux.com (Akinobu Mita)
- [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: mita@miraclelinux.com (Akinobu Mita)
- Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: Russell King <rmk+lkml@arm.linux.org.uk>
- Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: Richard Henderson <rth@twiddle.net>
- Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- From: Russell King <rmk+lkml@arm.linux.org.uk>
- [PATCH 0/6] RFC: use include/asm-generic/bitops.h
- Prev by Date: Re: CD writing in future Linux (stirring up a hornets' nest)
- Next by Date: Re: CD writing in future Linux (stirring up a hornets' nest)
- Previous by thread: Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- Next by thread: Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h
- Index(es):
![]() |