PATCH: Use__builtin_bswap[32|64] in i386/x86_64 bits/byteswap.h

Richard Henderson rth@twiddle.net
Mon Mar 19 17:38:00 GMT 2012


On 03/19/12 10:33, H.J. Lu wrote:
> Here is a patch to use __builtin_bswap[32|64] in i386/x86_64 bits/byteswap.h
> for GCC >= 4.2.  I didn't use __builtin_bswap32 for __bswap_16 since it is
> less efficient:

For size, yes.  For speed, is the partial register stall on rorw larger than
a single extra shift insn?


r~



More information about the Libc-alpha mailing list