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 ?
Hi,

On Sun, 15 Oct 2000, Andi Kleen wrote:

> 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.

Hmm, I just tried it and two things one should take care of here. 1. x
must be unsigned of course and 2. only gcc 2.95 can this do with a
nonconstant n.

bye, Roman


-
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:41    [W:0.034 / U:32.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site