52#ifndef XXH_FORCE_MEMORY_ACCESS
53# if defined(__GNUC__) && ( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) )
54# define XXH_FORCE_MEMORY_ACCESS 2
55# elif defined(__INTEL_COMPILER) || \
56 (defined(__GNUC__) && ( defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) ))
57# define XXH_FORCE_MEMORY_ACCESS 1
76#ifndef XXH_FORCE_NATIVE_FORMAT
77# define XXH_FORCE_NATIVE_FORMAT 0
87#ifndef XXH_FORCE_ALIGN_CHECK
88# if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
89# define XXH_FORCE_ALIGN_CHECK 0
91# define XXH_FORCE_ALIGN_CHECK 1
102static void* XXH_malloc(
size_t s) {
return malloc(
s); }
103static void XXH_free (
void*
p) { free(
p); }
106static void* XXH_memcpy(
void* dest,
const void* src,
size_t size) {
return memcpy(dest,src,size); }
108#define XXH_STATIC_LINKING_ONLY
116# pragma warning(disable : 4127)
117# define FORCE_INLINE static __forceinline
119# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
121# define FORCE_INLINE static inline __attribute__((always_inline))
123# define FORCE_INLINE static inline
126# define FORCE_INLINE static
135# if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) ) )
142 typedef unsigned short U16;
147#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2))
150static U32 XXH_read32(
const void* memPtr) {
return *(
const U32*) memPtr; }
152#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1))
157static U32 XXH_read32(
const void* ptr) {
return ((
const unalign*)ptr)->u32; }
164static U32 XXH_read32(
const void* memPtr)
167 memcpy(&val, memPtr,
sizeof(val));
177#define XXH_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
181# define XXH_rotl32(x,r) _rotl(x,r)
182# define XXH_rotl64(x,r) _rotl64(x,r)
184# define XXH_rotl32(x,r) ((x << r) | (x >> (32 - r)))
185# define XXH_rotl64(x,r) ((x << r) | (x >> (64 - r)))
189# define XXH_swap32 _byteswap_ulong
190#elif XXH_GCC_VERSION >= 403
191# define XXH_swap32 __builtin_bswap32
193static U32 XXH_swap32 (
U32 x)
195 return ((x << 24) & 0xff000000 ) |
196 ((x << 8) & 0x00ff0000 ) |
197 ((x >> 8) & 0x0000ff00 ) |
198 ((x >> 24) & 0x000000ff );
209#ifndef XXH_CPU_LITTLE_ENDIAN
210 static const int g_one = 1;
211# define XXH_CPU_LITTLE_ENDIAN (*(const char*)(&g_one))
223 return endian==
XXH_littleEndian ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr));
233static U32 XXH_readBE32(
const void* ptr)
242#define XXH_STATIC_ASSERT(c) { enum { XXH_static_assert = 1/(int)(!!(c)) }; }
249static const U32 PRIME32_1 = 2654435761U;
250static const U32 PRIME32_2 = 2246822519U;
251static const U32 PRIME32_3 = 3266489917U;
252static const U32 PRIME32_4 = 668265263U;
253static const U32 PRIME32_5 = 374761393U;
255static U32 XXH32_round(
U32 seed,
U32 input)
257 seed += input * PRIME32_2;
268#define XXH_get32bits(p) XXH_readLE32_align(p, endian, align)
270#ifdef XXH_ACCEPT_NULL_INPUT_POINTER
273 bEnd=
p=(
const BYTE*)(
size_t)16;
278 const BYTE*
const limit = bEnd - 16;
279 U32 v1 = seed + PRIME32_1 + PRIME32_2;
280 U32 v2 = seed + PRIME32_2;
282 U32 v4 = seed - PRIME32_1;
293 h32 = seed + PRIME32_5;
305 h32 += (*p) * PRIME32_5;
332 if ((((
size_t)input) & 3) == 0) {
362 memcpy(dstState, srcState,
sizeof(*dstState));
369 state.v1 = seed + PRIME32_1 + PRIME32_2;
370 state.v2 = seed + PRIME32_2;
372 state.v4 = seed - PRIME32_1;
383#ifdef XXH_ACCEPT_NULL_INPUT_POINTER
387 state->total_len_32 += (unsigned)
len;
396 if (
state->memsize) {
409 const BYTE*
const limit = bEnd - 16;
429 XXH_memcpy(
state->mem32,
p, (
size_t)(bEnd-
p));
430 state->memsize = (unsigned)(bEnd-
p);
454 if (
state->large_len) {
457 h32 =
state->v3 + PRIME32_5;
460 h32 +=
state->total_len_32;
469 h32 += (*p) * PRIME32_5;
507 memcpy(dst, &hash,
sizeof(*dst));
512 return XXH_readBE32(src);
516#ifndef XXH_NO_LONG_LONG
526# if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) ) )
530 typedef unsigned long long U64;
535#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2))
538static U64 XXH_read64(
const void* memPtr) {
return *(
const U64*) memPtr; }
540#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1))
545static U64 XXH_read64(
const void* ptr) {
return ((
const unalign64*)ptr)->u64; }
553static U64 XXH_read64(
const void* memPtr)
556 memcpy(&val, memPtr,
sizeof(val));
563# define XXH_swap64 _byteswap_uint64
564#elif XXH_GCC_VERSION >= 403
565# define XXH_swap64 __builtin_bswap64
567static U64 XXH_swap64 (
U64 x)
569 return ((x << 56) & 0xff00000000000000ULL) |
570 ((x << 40) & 0x00ff000000000000ULL) |
571 ((x << 24) & 0x0000ff0000000000ULL) |
572 ((x << 8) & 0x000000ff00000000ULL) |
573 ((x >> 8) & 0x00000000ff000000ULL) |
574 ((x >> 24) & 0x0000000000ff0000ULL) |
575 ((x >> 40) & 0x000000000000ff00ULL) |
576 ((x >> 56) & 0x00000000000000ffULL);
583 return endian==
XXH_littleEndian ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr));
593static U64 XXH_readBE64(
const void* ptr)
601static const U64 PRIME64_1 = 11400714785074694791ULL;
602static const U64 PRIME64_2 = 14029467366897019727ULL;
603static const U64 PRIME64_3 = 1609587929392839161ULL;
604static const U64 PRIME64_4 = 9650029242287828579ULL;
605static const U64 PRIME64_5 = 2870177450012600261ULL;
607static U64 XXH64_round(
U64 acc,
U64 input)
609 acc += input * PRIME64_2;
615static U64 XXH64_mergeRound(
U64 acc,
U64 val)
617 val = XXH64_round(0, val);
619 acc = acc * PRIME64_1 + PRIME64_4;
628#define XXH_get64bits(p) XXH_readLE64_align(p, endian, align)
630#ifdef XXH_ACCEPT_NULL_INPUT_POINTER
633 bEnd=
p=(
const BYTE*)(
size_t)32;
638 const BYTE*
const limit = bEnd - 32;
639 U64 v1 = seed + PRIME64_1 + PRIME64_2;
640 U64 v2 = seed + PRIME64_2;
642 U64 v4 = seed - PRIME64_1;
652 h64 = XXH64_mergeRound(h64, v1);
653 h64 = XXH64_mergeRound(h64, v2);
654 h64 = XXH64_mergeRound(h64, v3);
655 h64 = XXH64_mergeRound(h64, v4);
658 h64 = seed + PRIME64_5;
666 h64 =
XXH_rotl64(h64,27) * PRIME64_1 + PRIME64_4;
672 h64 =
XXH_rotl64(h64, 23) * PRIME64_2 + PRIME64_3;
677 h64 ^= (*p) * PRIME64_5;
704 if ((((
size_t)input) & 7)==0) {
732 memcpy(dstState, srcState,
sizeof(*dstState));
739 state.v1 = seed + PRIME64_1 + PRIME64_2;
740 state.v2 = seed + PRIME64_2;
742 state.v4 = seed - PRIME64_1;
752#ifdef XXH_ACCEPT_NULL_INPUT_POINTER
764 if (
state->memsize) {
775 const BYTE*
const limit = bEnd - 32;
795 XXH_memcpy(
state->mem64,
p, (
size_t)(bEnd-
p));
796 state->memsize = (unsigned)(bEnd-
p);
818 if (
state->total_len >= 32) {
825 h64 = XXH64_mergeRound(h64, v1);
826 h64 = XXH64_mergeRound(h64, v2);
827 h64 = XXH64_mergeRound(h64, v3);
828 h64 = XXH64_mergeRound(h64, v4);
830 h64 =
state->v3 + PRIME64_5;
838 h64 =
XXH_rotl64(h64,27) * PRIME64_1 + PRIME64_4;
844 h64 =
XXH_rotl64(h64, 23) * PRIME64_2 + PRIME64_3;
849 h64 ^= (*p) * PRIME64_5;
880 memcpy(dst, &hash,
sizeof(*dst));
885 return XXH_readBE64(src);
struct sysio::chain::eosvmoc::code_cache_header __attribute__((packed))
unsigned __int64 uint64_t
XXH_PUBLIC_API unsigned int XXH32_digest(const XXH32_state_t *state_in)
FORCE_INLINE U32 XXH32_digest_endian(const XXH32_state_t *state, XXH_endianess endian)
FORCE_INLINE U32 XXH32_endian_align(const void *input, size_t len, U32 seed, XXH_endianess endian, XXH_alignment align)
XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t *src)
FORCE_INLINE U64 XXH_readLE64(const void *ptr, XXH_endianess endian)
XXH_PUBLIC_API unsigned int XXH32(const void *input, size_t len, unsigned int seed)
XXH_PUBLIC_API XXH_errorcode XXH64_update(XXH64_state_t *state_in, const void *input, size_t len)
#define XXH_STATIC_ASSERT(c)
#define XXH_CPU_LITTLE_ENDIAN
FORCE_INLINE U64 XXH_readLE64_align(const void *ptr, XXH_endianess endian, XXH_alignment align)
XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t *dstState, const XXH32_state_t *srcState)
XXH_PUBLIC_API XXH32_state_t * XXH32_createState(void)
XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t *statePtr, unsigned int seed)
FORCE_INLINE U32 XXH_readLE32(const void *ptr, XXH_endianess endian)
XXH_PUBLIC_API XXH64_state_t * XXH64_createState(void)
XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH64_state_t *statePtr, unsigned long long seed)
FORCE_INLINE U64 XXH64_digest_endian(const XXH64_state_t *state, XXH_endianess endian)
FORCE_INLINE XXH_errorcode XXH32_update_endian(XXH32_state_t *state, const void *input, size_t len, XXH_endianess endian)
FORCE_INLINE U32 XXH_readLE32_align(const void *ptr, XXH_endianess endian, XXH_alignment align)
XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t *statePtr)
XXH_PUBLIC_API unsigned long long XXH64(const void *input, size_t len, unsigned long long seed)
XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t *src)
XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t *dst, XXH32_hash_t hash)
XXH_PUBLIC_API unsigned long long XXH64_digest(const XXH64_state_t *state_in)
XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t *statePtr)
FORCE_INLINE XXH_errorcode XXH64_update_endian(XXH64_state_t *state, const void *input, size_t len, XXH_endianess endian)
FORCE_INLINE U64 XXH64_endian_align(const void *input, size_t len, U64 seed, XXH_endianess endian, XXH_alignment align)
XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH64_canonical_t *dst, XXH64_hash_t hash)
#define XXH_FORCE_ALIGN_CHECK
XXH_PUBLIC_API unsigned XXH_versionNumber(void)
XXH_PUBLIC_API XXH_errorcode XXH32_update(XXH32_state_t *state_in, const void *input, size_t len)
XXH_PUBLIC_API void XXH64_copyState(XXH64_state_t *dstState, const XXH64_state_t *srcState)
#define XXH_FORCE_NATIVE_FORMAT
struct XXH32_state_s XXH32_state_t
struct XXH64_state_s XXH64_state_t
unsigned long long XXH64_hash_t
unsigned int XXH32_hash_t
#define XXH_VERSION_NUMBER
memset(pInfo->slotDescription, ' ', 64)
memcpy((char *) pInfo->slotDescription, s, l)