]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[i386] Optimise byte-swapping functions and provide __bswap_{16,32,64}s()
authorMichael Brown <mcb30@ipxe.org>
Sun, 4 Mar 2012 15:06:45 +0000 (15:06 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sun, 4 Mar 2012 15:14:47 +0000 (15:14 +0000)
commitaf96c4151ce96d04f960a79e5cf317353410bb1e
treee9e60f0fb1faf73099628a961e7c3223608e55f1
parent4a32308b400fadf0bdbb0a15c74d2440ee6482ee
[i386] Optimise byte-swapping functions and provide __bswap_{16,32,64}s()

Use the "bswap" instruction to shrink the size of byte-swapping code,
and provide the in-place variants __bswap_{16,32,64}s.

"bswap" is available only on 486 and later processors.  (We already
assume the presence of "cpuid" and "rdtsc", which are available only
on Pentium and later processors.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/include/bits/byteswap.h