Re: rotr32 / rotl32 (wordops.h) in 2.4.x ?

From: Andi Kleen (ak@suse.de)
Date: Sun Oct 15 2000 - 09:57:27 EST


On Sun, Oct 15, 2000 at 03:35:36PM +0200, Harald Welte wrote:
> Hi!
>
> In the 2.2 series kernel are some fucntions for rotating left / right.
>
> But it seems that the generic_rotr32 / generic_rotl32 as well as the
> architecture dependent counterparts rotr32 /rotl32 have disappeared.
>
> Is ther any replacement, and if yes, where ?

You can just use the coded out variant (x<<n | (x>>(sizeof(x)*8-n)))
gcc is clever enough to turn it into an rotate when the CPU supports it.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 21:00:28 EST