| 79 | } |
| 80 | |
| 81 | inline uint64_t DecodeFixed64(const uint8_t *ptr) { |
| 82 | #if __BYTE_ORDER == __LITTLE_ENDIAN |
| 83 | // Load the raw bytes |
| 84 | uint64_t result; |
| 85 | memcpy(&result, ptr, sizeof(result)); // gcc optimizes this to a plain load |
| 86 | return result; |
| 87 | #else |
| 88 | uint64_t lo = DecodeFixed32(ptr); |
| 89 | uint64_t hi = DecodeFixed32(ptr + 4); |
| 90 | return (hi << 32) | lo; |
| 91 | #endif |
| 92 | } |
| 93 | |
| 94 | // Internal routine for use by fallback path of GetVarint32Ptr |
| 95 | extern const uint8_t *GetVarint32PtrFallback(const uint8_t *p, |
nothing calls this directly
no test coverage detected