From 8bfe93fbf9766a3c4ff52fce9dc8211c8dc297c5 Mon Sep 17 00:00:00 2001 From: Havard Eidnes Date: Wed, 28 Dec 2022 14:13:19 +0100 Subject: [PATCH] c/blake3_impl.h: don't try to do NEON on big-endian aarch64. ...because this would otherwise hit #error "This implementation only supports little-endian ARM." in c/blake3_neon.c. --- c/blake3_impl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/c/blake3_impl.h b/c/blake3_impl.h index 3ba9ceb0..beab5cf5 100644 --- a/c/blake3_impl.h +++ b/c/blake3_impl.h @@ -51,7 +51,11 @@ enum blake3_flags { #if !defined(BLAKE3_USE_NEON) // If BLAKE3_USE_NEON not manually set, autodetect based on AArch64ness #if defined(IS_AARCH64) - #define BLAKE3_USE_NEON 1 + #if defined(__ARM_BIG_ENDIAN) + #define BLAKE3_USE_NEON 0 + #else + #define BLAKE3_USE_NEON 1 + #endif #else #define BLAKE3_USE_NEON 0 #endif