summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndi Kleen <ak@muc.de>2002-10-11 06:07:19 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-10-11 06:07:19 -0700
commit08f895c3998348daf924ba233b3584bbba57be2b (patch)
treefc96f6e0c83f9acef04b65ddcee4aeff3fd5b366 /include/linux
parentb4655acd91583dc201e47b3e346f9ab686dda385 (diff)
[PATCH] Efficient bswab64 for i386
Due to some bugs in byteorder/generic.h linux would always use C handcoded swab64 for 64bit ntohq or cpu_to_be64. The C version is very inefficient and expands to 30+ instructions of horrible code. This hurts on filesystems that use on disk big endian data structures with 64bit data types. This patch adds an assembly optimized swab64 to fix it. Now bswab64 is 4 instructions when your CPU supports bswap and 9 when it doesn't. Tests were done with gcc 3.2, may be different on older gcc. This is good for ~600 bytes code size reduction in XFS (gcc 3.2): Before: 503199 3296 1682 508177 7c111 fs/xfs/xfs.o After: 502543 3296 1682 507521 7be81 fs/xfs/xfs.o Also should be faster. Also some minor cleanups in the file.
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions