Thread (30 messages) flat view 30 messages, 15 authors, 2006-01-30

Re: [parisc-linux] Re: [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h

From: Grant Grundler <hidden>
Date: 2006-01-26 16:09:20
Also in: linux-mips, lkml, sparclinux

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help