MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rev8

Function rev8

app/redis-6.2.6/src/crcspeed.c:71–83  ·  view source on GitHub ↗

Reverse the bytes in a 64-bit word. */

Source from the content-addressed store, hash-verified

69
70/* Reverse the bytes in a 64-bit word. */
71static inline uint64_t rev8(uint64_t a) {
72#if defined(__GNUC__) || defined(__clang__)
73 return __builtin_bswap64(a);
74#else
75 uint64_t m;
76
77 m = UINT64_C(0xff00ff00ff00ff);
78 a = ((a >> 8) & m) | (a & m) << 8;
79 m = UINT64_C(0xffff0000ffff);
80 a = ((a >> 16) & m) | (a & m) << 16;
81 return a >> 32 | a << 32;
82#endif
83}
84
85/* This function is called once to initialize the CRC table for use on a
86 big-endian architecture. */

Callers 4

crcspeed64big_initFunction · 0.85
crcspeed16big_initFunction · 0.85
crcspeed64bigFunction · 0.85
crcspeed16bigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected