From a1956187aded5ffa633b004b30b9cbbca97705ea Mon Sep 17 00:00:00 2001 From: Ken-ichi Mito Date: Sat, 4 Sep 2021 15:17:22 +0900 Subject: [PATCH] use __ARM_NEON along with __ARM_NEON__ to detect NEON availability '__ARM_NEON' is proper symbol in ARM C Language Extensions '__ARM_NEON__' is legacy and not defined anymore in Aarch64 --- src/multi2_cipher.h | 2 +- src/multi2_neon.h | 4 ++-- src/multi2_neon2.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/multi2_cipher.h b/src/multi2_cipher.h index 296e65a..ad57aec 100644 --- a/src/multi2_cipher.h +++ b/src/multi2_cipher.h @@ -194,7 +194,7 @@ inline void decrypt_cbc_ofb(uint8_t *buf, size_t n, const iv_type &iv, const wor decrypt_block(buf, n, state, key, round); } -#elif defined(__ARM_NEON__) +#elif defined(__ARM_NEON__) || defined(__ARM_NEON) if (MULTI2_LIKELY(n == 184)) { decrypt_block >(buf, n, state, key, round); decrypt_block >(buf, n, state, key, round); diff --git a/src/multi2_neon.h b/src/multi2_neon.h index 224ad02..4a1d560 100644 --- a/src/multi2_neon.h +++ b/src/multi2_neon.h @@ -1,6 +1,6 @@ #pragma once -#if defined(__ARM_NEON__) +#if defined(__ARM_NEON__) || defined(__ARM_NEON) #if !defined(__BYTE_ORDER__) || !defined(__ORDER_LITTLE_ENDIAN__) || (__BYTE_ORDER__) != (__ORDER_LITTLE_ENDIAN__) #error "Currently, USE_NEON is only for little-endian." @@ -110,4 +110,4 @@ inline arm::neon rot1_add_dec(const arm::neon &v) { } -#endif /* __ARM_NEON__ */ +#endif /* __ARM_NEON__ || __ARM_NEON */ diff --git a/src/multi2_neon2.h b/src/multi2_neon2.h index a406abf..b46056e 100644 --- a/src/multi2_neon2.h +++ b/src/multi2_neon2.h @@ -1,6 +1,6 @@ #pragma once -#if defined(__ARM_NEON__) +#if defined(__ARM_NEON__) || defined(__ARM_NEON) #include #include @@ -198,4 +198,4 @@ inline arm::neon2 rot1_add_dec(const arm::neon2 &v) { } -#endif /* __ARM_NEON__ */ +#endif /* __ARM_NEON__ || __ARM_NEON */