summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-03-17 23:28:58 -0400
committerJeffrey Walton <noloader@gmail.com>2021-03-17 23:28:58 -0400
commitb127d4aaba7c92035c989325a80c164ab6c32154 (patch)
tree17cdec9ffc5edfb08142b873b33cb7db415826ee
parent29b7ea850e4622a315b46835d9421f64a3087d2a (diff)
downloadcryptopp-git-b127d4aaba7c92035c989325a80c164ab6c32154.tar.gz
Remove NEON code paths from xorbuf
NEON on 32-bit ARM machines is experiencing a slight slowdown on modern compilers.
-rw-r--r--misc.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/misc.cpp b/misc.cpp
index f078de1a..cd329c72 100644
--- a/misc.cpp
+++ b/misc.cpp
@@ -23,7 +23,7 @@
# include <immintrin.h>
#endif
-#if defined(__ARM_FEATURE_NEON) || defined(__aarch64__) || defined(__aarch32__) || defined(_M_ARM64)
+#if defined(__aarch64__) || defined(__aarch32__) || defined(_M_ARM64)
# if defined(CRYPTOPP_ARM_NEON_HEADER)
# include <arm_neon.h>
# endif
@@ -93,15 +93,6 @@ void xorbuf(byte *buf, const byte *mask, size_t count)
if (count == 0) return;
#endif
-#if defined(__ARM_FEATURE_NEON)
- while (count >= 16)
- {
- vst1q_u8(buf, veorq_u8(vld1q_u8(buf), vld1q_u8(mask)));
- buf += 16; mask += 16; count -= 16;
- }
-
- if (count == 0) return;
-#endif
#if CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
// word64 and stride of 8 slows things down on x86_64.
@@ -177,15 +168,6 @@ void xorbuf(byte *output, const byte *input, const byte *mask, size_t count)
if (count == 0) return;
#endif
-#if defined(__ARM_FEATURE_NEON)
- while (count >= 16)
- {
- vst1q_u8(output, veorq_u8(vld1q_u8(input), vld1q_u8(mask)));
- output += 16; input += 16; mask += 16; count -= 16;
- }
-
- if (count == 0) return;
-#endif
#if CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
// word64 and stride of 8 slows things down on x86_64.