Skip to content

Commit

Permalink
c/blake3_impl.h: don't try to do NEON on big-endian aarch64.
Browse files Browse the repository at this point in the history
...because this would otherwise hit
  #error "This implementation only supports little-endian ARM."
in c/blake3_neon.c.
  • Loading branch information
he32 authored and oconnor663 committed Sep 19, 2023
1 parent 8cdfaa4 commit 8bfe93f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion c/blake3_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8bfe93f

Please sign in to comment.