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

From: Andi Kleen
Date: Fri Aug 07 2009 - 02:50:26 EST


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.

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/