| Index: third_party/WebKit/Source/wtf/ByteSwap.h
|
| diff --git a/third_party/WebKit/Source/wtf/ByteSwap.h b/third_party/WebKit/Source/wtf/ByteSwap.h
|
| index fb2ee0e74b30223706611efd9b78aefc7e9c15b1..3f4462ccaafea0a59b7c9c0b16a876aa0a1700f2 100644
|
| --- a/third_party/WebKit/Source/wtf/ByteSwap.h
|
| +++ b/third_party/WebKit/Source/wtf/ByteSwap.h
|
| @@ -42,32 +42,50 @@
|
|
|
| namespace WTF {
|
|
|
| -inline uint32_t wswap32(uint32_t x) { return ((x & 0xffff0000) >> 16) | ((x & 0x0000ffff) << 16); }
|
| +inline uint32_t wswap32(uint32_t x) {
|
| + return ((x & 0xffff0000) >> 16) | ((x & 0x0000ffff) << 16);
|
| +}
|
|
|
| #if COMPILER(MSVC)
|
|
|
| -ALWAYS_INLINE uint64_t bswap64(uint64_t x) { return _byteswap_uint64(x); }
|
| -ALWAYS_INLINE uint32_t bswap32(uint32_t x) { return _byteswap_ulong(x); }
|
| -ALWAYS_INLINE uint16_t bswap16(uint16_t x) { return _byteswap_ushort(x); }
|
| +ALWAYS_INLINE uint64_t bswap64(uint64_t x) {
|
| + return _byteswap_uint64(x);
|
| +}
|
| +ALWAYS_INLINE uint32_t bswap32(uint32_t x) {
|
| + return _byteswap_ulong(x);
|
| +}
|
| +ALWAYS_INLINE uint16_t bswap16(uint16_t x) {
|
| + return _byteswap_ushort(x);
|
| +}
|
|
|
| #else
|
|
|
| -ALWAYS_INLINE uint64_t bswap64(uint64_t x) { return __builtin_bswap64(x); }
|
| -ALWAYS_INLINE uint32_t bswap32(uint32_t x) { return __builtin_bswap32(x); }
|
| -ALWAYS_INLINE uint16_t bswap16(uint16_t x) { return __builtin_bswap16(x); }
|
| +ALWAYS_INLINE uint64_t bswap64(uint64_t x) {
|
| + return __builtin_bswap64(x);
|
| +}
|
| +ALWAYS_INLINE uint32_t bswap32(uint32_t x) {
|
| + return __builtin_bswap32(x);
|
| +}
|
| +ALWAYS_INLINE uint16_t bswap16(uint16_t x) {
|
| + return __builtin_bswap16(x);
|
| +}
|
|
|
| #endif
|
|
|
| #if CPU(64BIT)
|
|
|
| -ALWAYS_INLINE size_t bswapuintptrt(size_t x) { return bswap64(x); }
|
| +ALWAYS_INLINE size_t bswapuintptrt(size_t x) {
|
| + return bswap64(x);
|
| +}
|
|
|
| #else
|
|
|
| -ALWAYS_INLINE size_t bswapuintptrt(size_t x) { return bswap32(x); }
|
| +ALWAYS_INLINE size_t bswapuintptrt(size_t x) {
|
| + return bswap32(x);
|
| +}
|
|
|
| #endif
|
|
|
| -} // namespace WTF
|
| +} // namespace WTF
|
|
|
| -#endif // WTF_ByteSwap_h
|
| +#endif // WTF_ByteSwap_h
|
|
|