| 515 | } |
| 516 | |
| 517 | static inline npy_uint64 |
| 518 | npy_bswap8(npy_uint64 x) |
| 519 | { |
| 520 | #ifdef HAVE___BUILTIN_BSWAP64 |
| 521 | return __builtin_bswap64(x); |
| 522 | #else |
| 523 | return ((x & 0xffULL) << 56) | |
| 524 | ((x & 0xff00ULL) << 40) | |
| 525 | ((x & 0xff0000ULL) << 24) | |
| 526 | ((x & 0xff000000ULL) << 8) | |
| 527 | ((x & 0xff00000000ULL) >> 8) | |
| 528 | ((x & 0xff0000000000ULL) >> 24) | |
| 529 | ((x & 0xff000000000000ULL) >> 40) | |
| 530 | ( x >> 56); |
| 531 | #endif |
| 532 | } |
| 533 | |
| 534 | static inline void |
| 535 | npy_bswap8_unaligned(char * x) |
no outgoing calls
no test coverage detected