Re: [PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 count, and that is something GCC just might be able to do :)


At least i386 and x86-64 gcc should recognize

	((foo << x) + (foo >> (32-x)))

... as a 32-bit rotate; similar for 8-, 16- and 64-bit rotates of appropriate sized items. Also, it seems it could just be an inline function instead of a macro.

	-hpa

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux