diff options
author | dim <dim@FreeBSD.org> | 2012-03-29 23:30:17 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-03-29 23:30:17 +0000 |
commit | 56f6402e5ac3232bb8c00f9e6875327c214941cb (patch) | |
tree | e2f0ecf35f11c9ca2cceaae45479548c29d92a3e /sys/x86/include/endian.h | |
parent | d8968134ade90c21e293ce26b91de6816395eb6d (diff) | |
download | FreeBSD-src-56f6402e5ac3232bb8c00f9e6875327c214941cb.zip FreeBSD-src-56f6402e5ac3232bb8c00f9e6875327c214941cb.tar.gz |
Revert sys/x86/include/endian.h to what it was before r233419, as that
revision has two problems:
- It can produce worse code with both clang and gcc.
- It doesn't fix the actual issue introduced in r232721, which will be
fixed in the next commit.
Submitted by: bde, tijl and jh
Pointy hat to: dim
Diffstat (limited to 'sys/x86/include/endian.h')
-rw-r--r-- | sys/x86/include/endian.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/x86/include/endian.h b/sys/x86/include/endian.h index 9059587..2f95320 100644 --- a/sys/x86/include/endian.h +++ b/sys/x86/include/endian.h @@ -63,11 +63,11 @@ #define BYTE_ORDER _BYTE_ORDER #endif -#define __bswap16_gen(x) ((__uint16_t)((x) << 8 | (x) >> 8)) +#define __bswap16_gen(x) (__uint16_t)((x) << 8 | (x) >> 8) #define __bswap32_gen(x) \ - (((__uint32_t)__bswap16_gen(x) << 16) | __bswap16_gen((x) >> 16)) + (((__uint32_t)__bswap16(x) << 16) | __bswap16((x) >> 16)) #define __bswap64_gen(x) \ - (((__uint64_t)__bswap32_gen(x) << 32) | __bswap32_gen((x) >> 32)) + (((__uint64_t)__bswap32(x) << 32) | __bswap32((x) >> 32)) #ifdef __GNUCLIKE_BUILTIN_CONSTANT_P #define __bswap16(x) \ |