Subject: Re: MAXPARTITIONS (kern/18256)
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Andrea Cocito <>
List: tech-kern
Date: 06/17/2003 07:49:11
On Tuesday, Jun 17, 2003, at 03:27 Europe/Rome, der Mouse wrote:

>> As an interum, the i386 method should be changed to move bit fields
>> around.  We're talking about quantities that line up as nice
>> bitmasks, yet it does multiplication and division.
> If multiplication and division by powers of two don't turn into shifts,
> we seriously need a better compiler.  That's really rudimentary
> optimization, the sort of thing I would expect a compiler to do even
> without specifically enabling optimization.

You can bet GCC does it. When it doesn't it's just because on
that particular cpu/platform it's actually faster to use a normal
multiplication or division.

I have stopped trying to type asm code better than a compiler
a few years ago.... when I have been beated badly by mister
GCC in that ;)



Andrea Cocito <>
IEO -- European Institute of Oncology - Bioinformatics group
tel: +39 02 57489 857   fax: +39 02 57489 851

"Imagination is more important than knowledge"
   -Albert Einstein