lkml.org 
[lkml]   [2000]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: rotr32 / rotl32 (wordops.h) in 2.4.x ?
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/

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.296 / U:1.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site