From 080b3330159a19407dddb407dc917925ac40c4d3 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Thu, 29 Jul 2021 23:46:29 -0400 Subject: [PATCH] explicitly #error on big-endian ARM --- c/blake3_neon.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/c/blake3_neon.c b/c/blake3_neon.c index 46691f5..a6f6da9 100644 --- a/c/blake3_neon.c +++ b/c/blake3_neon.c @@ -2,7 +2,12 @@ #include -// TODO: This is probably incorrect for big-endian ARM. How should that work? +#ifdef __ARM_BIG_ENDIAN +#error "This implementation only supports little-endian ARM." +// It might be that all we need for big-endian support here is to get the loads +// and stores right, but step zero would be finding a way to test it in CI. +#endif + INLINE uint32x4_t loadu_128(const uint8_t src[16]) { // vld1q_u32 has alignment requirements. Don't use it. uint32x4_t x;