Alan Cox wrote:
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
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
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
Alan Cox wrote:
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
Zachary Amsden wrote:
This one in particular is non-optimal looking from C because the
compiler misses the potential for rotation. But, composing into
temporaries and then issuing two writes to memory instead of multiple
writes within the same word could actually get you a better cycle
Andi Kleen wrote:
On Wed, Aug 10, 2005 at 09:54:11PM -0700, [EMAIL PROTECTED] wrote:
Use an early clobber on addr to avoid the extra rorl instruction at the
end of _set_tssldt_desc.
I would suggest to just use C for this. I do this on x86-64 and
I don't think there is any reason to
On Wed, Aug 10, 2005 at 09:54:11PM -0700, [EMAIL PROTECTED] wrote:
> Use an early clobber on addr to avoid the extra rorl instruction at the
> end of _set_tssldt_desc.
I would suggest to just use C for this. I do this on x86-64 and
I don't think there is any reason to use this hard to maintain
On Wed, Aug 10, 2005 at 09:54:11PM -0700, [EMAIL PROTECTED] wrote:
Use an early clobber on addr to avoid the extra rorl instruction at the
end of _set_tssldt_desc.
I would suggest to just use C for this. I do this on x86-64 and
I don't think there is any reason to use this hard to maintain
Andi Kleen wrote:
On Wed, Aug 10, 2005 at 09:54:11PM -0700, [EMAIL PROTECTED] wrote:
Use an early clobber on addr to avoid the extra rorl instruction at the
end of _set_tssldt_desc.
I would suggest to just use C for this. I do this on x86-64 and
I don't think there is any reason to
Zachary Amsden wrote:
This one in particular is non-optimal looking from C because the
compiler misses the potential for rotation. But, composing into
temporaries and then issuing two writes to memory instead of multiple
writes within the same word could actually get you a better cycle
10 matches
Mail list logo