[Zlib-devel] [4/8][RFC V3 Patch] Add an x86 version of Adler32
Jan Seiffert
kaffeemonster at googlemail.com
Sun Apr 24 12:35:41 EDT 2011
And finally an x86 version of Adler32.
it covers:
* Plain
* MMX
* SSE
* SSE2
* SSSE3
* 32 & 64 Bit
* PIC and non PIC
And features a runtime cpu detection + dispatch.
The runtime dispatch has two versions, one simple using a function
pointer, one which checks if the selected function is out of bounds,
to protect against memory corruption (activated when _FORTIFY_SOURCE >
0)
It heavily uses inline ASM, so it's restricted to GCC (or compatible
compiler, like clang).
This gives us help from the compiler for boilerplate code, all the
fiddling with calling conventions, PIC and bit-ness of the code.
The speed numbers left out this time, to save space, i can post them separately.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 04-x86.patch
Type: text/x-patch
Size: 40666 bytes
Desc: not available
URL: <http://madler.net/pipermail/zlib-devel_madler.net/attachments/20110424/e82e2437/attachment.bin>
More information about the Zlib-devel
mailing list