From bab101ce8d6d3c0675ef075317372d41b553bd0d Mon Sep 17 00:00:00 2001 From: Sriranga Veeraraghavan Date: Mon, 11 Sep 2023 09:50:55 -0700 Subject: [PATCH] minor fixes for Xcode 14.2 warnings when building BLAKE3 with neon enabled --- c/blake3_dispatch.c | 5 +++-- c/blake3_impl.h | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/c/blake3_dispatch.c b/c/blake3_dispatch.c index af6c3da..21fcc1a 100644 --- a/c/blake3_dispatch.c +++ b/c/blake3_dispatch.c @@ -89,6 +89,7 @@ static void cpuidex(uint32_t out[4], uint32_t id, uint32_t sid) { #endif enum cpu_feature { + NONE = 0, SSE2 = 1 << 0, SSSE3 = 1 << 1, SSE41 = 1 << 2, @@ -265,11 +266,11 @@ void blake3_hash_many(const uint8_t *const *inputs, size_t num_inputs, blake3_hash_many_neon(inputs, num_inputs, blocks, key, counter, increment_counter, flags, flags_start, flags_end, out); return; -#endif - +#else blake3_hash_many_portable(inputs, num_inputs, blocks, key, counter, increment_counter, flags, flags_start, flags_end, out); +#endif } // The dynamically detected SIMD degree of the current platform. diff --git a/c/blake3_impl.h b/c/blake3_impl.h index 3ba9ceb..9ea7f16 100644 --- a/c/blake3_impl.h +++ b/c/blake3_impl.h @@ -275,6 +275,10 @@ void blake3_hash_many_neon(const uint8_t *const *inputs, size_t num_inputs, uint64_t counter, bool increment_counter, uint8_t flags, uint8_t flags_start, uint8_t flags_end, uint8_t *out); +void blake3_hash4_neon(const uint8_t *const *inputs, size_t blocks, + const uint32_t key[8], uint64_t counter, + bool increment_counter, uint8_t flags, + uint8_t flags_start, uint8_t flags_end, uint8_t *out); #endif