|
Description
|
Optimize the BSWAP_8, 16, 32, 64 and BE_8, 16, 32, and 64 #define macros in sys/byteorder.h to use inline amd64 assembly.
For SPARC and x86 32-bit, the current macros can still be used.
This is similar to CR 5007142, where ntohll() and htonll() (also in byteorder.h) are implemented with inline assembly.
The inline assembly differs between the Sun and GNU C compilers--see 5007142.
Another issue is signed/unsigned integer conversion. These aren't problems with #define macros, but could generate problems when a function is called and a signed integer is passed to a function that returns a unsigned integer.
See also CR 4760705 to avoid namespace pollution with these (nonstandard) macros.
|