Re: [PATCH] Make shr to divide by power of 2

From: Sergey Senozhatsky
Date: Fri Aug 07 2009 - 03:39:55 EST


On (08/07/09 08:50), Andi Kleen wrote:
> Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx> writes:
> >
> > Of course, compiler supposed to do something like
> > add $0x7,%eax
> > shr $0x3,%eax
> > instead of div. Should we rely on this?
>
> Yes. We should rely on this.
>

grep -cR '>> 3' bitblit.c
5

and only 1 '/8'.

Sergey

Attachment: signature.asc
Description: Digital signature