XHCI big clean up, #define necessary bits for readability, change .clang-format options
All checks were successful
Build ISO image / build-and-deploy (push) Successful in 3m5s
Build documentation / build-and-deploy (push) Successful in 3m50s

This commit is contained in:
2026-03-31 22:51:51 +02:00
parent 8f1e24653d
commit ee0e56928d
14 changed files with 401 additions and 119 deletions

View File

@@ -50,13 +50,20 @@
*/
#ifndef XXH_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */
#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__))
(defined(__ARM_ARCH_6__) || \
defined(__ARM_ARCH_6J__) || \
defined(__ARM_ARCH_6K__) || \
defined(__ARM_ARCH_6Z__) || \
defined(__ARM_ARCH_6ZK__) || \
defined(__ARM_ARCH_6T2__))
#define XXH_FORCE_MEMORY_ACCESS 2
#elif (defined(__INTEL_COMPILER) && !defined(_WIN32)) || \
(defined(__GNUC__) && \
(defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || \
defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)))
(defined(__ARM_ARCH_7__) || \
defined(__ARM_ARCH_7A__) || \
defined(__ARM_ARCH_7R__) || \
defined(__ARM_ARCH_7M__) || \
defined(__ARM_ARCH_7S__)))
#define XXH_FORCE_MEMORY_ACCESS 1
#endif
#endif
@@ -204,7 +211,9 @@ static U32 XXH_read32 (const void* memPtr) {
#define XXH_swap32 __builtin_bswap32
#else
static U32 XXH_swap32 (U32 x) {
return ((x << 24) & 0xff000000) | ((x << 8) & 0x00ff0000) | ((x >> 8) & 0x0000ff00) |
return ((x << 24) & 0xff000000) |
((x << 8) & 0x00ff0000) |
((x >> 8) & 0x0000ff00) |
((x >> 24) & 0x000000ff);
}
#endif
@@ -536,7 +545,9 @@ FORCE_INLINE U32 XXH32_digest_endian (const XXH32_state_t* state, XXH_endianness
U32 h32;
if (state->large_len) {
h32 = XXH_rotl32 (state->v1, 1) + XXH_rotl32 (state->v2, 7) + XXH_rotl32 (state->v3, 12) +
h32 = XXH_rotl32 (state->v1, 1) +
XXH_rotl32 (state->v2, 7) +
XXH_rotl32 (state->v3, 12) +
XXH_rotl32 (state->v4, 18);
} else {
h32 = state->v3 /* == seed */ + PRIME32_5;
@@ -634,10 +645,14 @@ static U64 XXH_read64 (const void* memPtr) {
#define XXH_swap64 __builtin_bswap64
#else
static U64 XXH_swap64 (U64 x) {
return ((x << 56) & 0xff00000000000000ULL) | ((x << 40) & 0x00ff000000000000ULL) |
((x << 24) & 0x0000ff0000000000ULL) | ((x << 8) & 0x000000ff00000000ULL) |
((x >> 8) & 0x00000000ff000000ULL) | ((x >> 24) & 0x0000000000ff0000ULL) |
((x >> 40) & 0x000000000000ff00ULL) | ((x >> 56) & 0x00000000000000ffULL);
return ((x << 56) & 0xff00000000000000ULL) |
((x << 40) & 0x00ff000000000000ULL) |
((x << 24) & 0x0000ff0000000000ULL) |
((x << 8) & 0x000000ff00000000ULL) |
((x >> 8) & 0x00000000ff000000ULL) |
((x >> 24) & 0x0000000000ff0000ULL) |
((x >> 40) & 0x000000000000ff00ULL) |
((x >> 56) & 0x00000000000000ffULL);
}
#endif