[Zlib-devel] zlib 1.2.6.1

Steve Snyder swsnyder at snydernet.net
Mon Feb 13 18:05:09 EST 2012


On Monday, February 13, 2012 4:46pm, "Maarten Bosmans" <mkbosmans at gmail.com> said:

> - The function __builtin_bswap32 is not defined in byteswap.h, but is
> a GCC intrinsic
> 
> byteswap.h does define a bswap_32 function, which could be used in
> another #elif branch, but the current patch does not provide for that.

That reference to file byteswap.h is a relic of the original patch submission, which included a 16-bit byte swap.  There's no __builtin_* for a 16-bit value, so the older bswap_16() was used.

The older bswap_32 still exists but has been deprecated in favor of __builtin_bswap32.  The newer function doesn't disrupt register allocation through inline assembly like the older function does.






More information about the Zlib-devel mailing list