On Maw, 2005-08-16 at 17:06 -0700, H. Peter Anvin wrote: > At least i386 and x86-64 gcc should recognize > > ((foo << x) + (foo >> (32-x))) > > ... as a 32-bit rotate Only for 1 <= x <= 31. For the x = 0 case the code posted is undefined and at least in some cases gcc will do "interesting" things as a result such as treating >> 32 as >> 0. Alan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc
- From: "H. Peter Anvin" <[email protected]>
- Re: [PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc
- References:
- [PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc
- From: [email protected]
- Re: [PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc
- From: Andi Kleen <[email protected]>
- Re: [PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc
- From: Zachary Amsden <[email protected]>
- Re: [PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc
- From: "H. Peter Anvin" <[email protected]>
- [PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc
- Prev by Date: NAPI poll routine happens in interrupt context?
- Next by Date: Re: [PATCH] Don't use a klist for drivers' set-of-devices
- Previous by thread: Re: [PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc
- Next by thread: Re: [PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc
- Index(es):