Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/sgimips/sgimips



Christopher SEKIYA wrote:

> On Mon, Jan 12, 2004 at 10:35:11PM +1100, Simon Burge wrote:
> 
> > I haven't looked in detail at the code in question, but if a "* 8" is 
> > clearer
> > than a "<< 3" then I'd be tempted to leave it as is...
> 
> Maybe it's a style thing -- I was taught that bit shifts were preferred to
> multiplication/division, and IMHO when dealing with bits in registers, it's
> easier to read "<<" rather than "*".

For bit numbers, I also agree that shifts are better.  Maybe we could
even argue that the "+" in that same expression should be a "|" :-)

Simon.
--
Simon Burge                            <simonb%wasabisystems.com@localhost>
NetBSD Support and Service:         http://www.wasabisystems.com/



Home | Main Index | Thread Index | Old Index