Subject: Re: CVS commit: src/sys/arch/sgimips/sgimips
To: Christopher SEKIYA <wileyc@rezrov.net>
From: Simon Burge <simonb@wasabisystems.com>
List: source-changes
Date: 01/12/2004 22:48:15
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>
NetBSD Support and Service: http://www.wasabisystems.com/