[Zlib-devel] [4/6][RFC V2 Patch] Add an x86 version of Adler32

Török Edwin edwintorok at gmail.com
Thu Mar 31 04:05:07 EDT 2011


On 2011-03-30 17:24, Jan Seiffert wrote:
> 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.
> 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.

Could you use the 'ifunc' attribute to make the runtime selection? (that
is what glibc uses)
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

On the plus side it'd eliminate the race condition, on the downside it'd
require a non-ancient binutils and glibc.

Best regards,
--Edwin




More information about the Zlib-devel mailing list