daily update on 20240206 by nitload youmu, token parser change to use regex generator

This commit is contained in:
Nitload
2025-02-06 07:45:06 +08:00
parent 4e5a1b0dfb
commit 7d0470d50b
104 changed files with 2752 additions and 3134 deletions
+7 -12
View File
@@ -1,9 +1,9 @@
#include "ssc_intrinsic.h"
#include "StgSharpC.h"
static inline uint32_t fmix32(uint32_t h);
static inline uint32_t fmix32(uint32_t hash);
INTERNAL int SSCDECL city_hash_simplify(byte const *str, int const length)
INTERNAL int SSCDECL city_hash_simplify_sse(byte const *str, int const length)
{
uint32_t hash = length, size = length << 1;
byte *end = str + size, *ptr = str;
@@ -37,15 +37,10 @@ INTERNAL int SSCDECL city_hash_simplify(byte const *str, int const length)
hash = _mm_crc32_u8(hash,*ptr);
}
}
hash ^= hash >> 16;
hash *= 0x85ebca6b;
hash ^= hash >> 13;
hash *= 0xc2b2ae35;
hash ^= hash >> 16;
return fmix32(hash);
}
INTERNAL inline uint32_t fmix32(uint32_t h)
{
h ^= h >> 16;
h *= 0x85ebca6b;
h ^= h >> 13;
h *= 0xc2b2ae35;
h ^= h >> 16;
return h;
}