On Fri, Jul 13, 2007 at 12:38:02PM +0200, Stefan Reinauer wrote:
dra = ((page_size / 8) >> 10);
Please don't use bit shifting for multiplication and division.
I think this is a bad dogma. Using shifts for mul/div is pretty obvious to understand and almost courteous.
Or it's human adapting to machine rather than the other way around.
Personally, I adapted long ago so I like shifts too, but not everyone does. It touches on "Encapsulate and isolate assembly language" in the coding guidelines.
RAM init is many bits back and forth anyway though, so if we need to pick just one piece of code where it's OK, that would be it.
//Peter