summaryrefslogtreecommitdiff
path: root/chacha_simd.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-01-03 19:52:57 -0500
committerJeffrey Walton <noloader@gmail.com>2019-01-03 19:52:57 -0500
commita0fa63879fedf42b6e0bb342ddc8b2117de7ea70 (patch)
tree21301e0a031bc956a80bdef903623a320bb5d846 /chacha_simd.cpp
parented349dced16becd20ddc8c725d36d5fce2e5e786 (diff)
downloadcryptopp-git-a0fa63879fedf42b6e0bb342ddc8b2117de7ea70.tar.gz
Add PACK32x4 macro guard
Diffstat (limited to 'chacha_simd.cpp')
-rw-r--r--chacha_simd.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/chacha_simd.cpp b/chacha_simd.cpp
index b7d9c0a9..615a0a55 100644
--- a/chacha_simd.cpp
+++ b/chacha_simd.cpp
@@ -72,11 +72,13 @@ ANONYMOUS_NAMESPACE_BEGIN
// Thanks to Peter Cordes, https://stackoverflow.com/q/54016821/608639
#if (CRYPTOPP_ARM_NEON_AVAILABLE)
-# if defined(_MSC_VER)
-# define PACK32x4(w,x,y,z) { ((w) + (word64(x) << 32)), ((y) + (word64(z) << 32)) }
-# else
-# define PACK32x4(w,x,y,z) { (w), (x), (y), (z) }
-# endif
+# ifndef PACK32x4
+# if defined(_MSC_VER)
+# define PACK32x4(w,x,y,z) { ((w) + (word64(x) << 32)), ((y) + (word64(z) << 32)) }
+# else
+# define PACK32x4(w,x,y,z) { (w), (x), (y), (z) }
+# endif
+# endif // PACK32x4
#endif // Microsoft workaround
#if (CRYPTOPP_ARM_NEON_AVAILABLE)