summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-11-08 16:20:31 -0500
committerJeffrey Walton <noloader@gmail.com>2018-11-08 16:20:31 -0500
commitd9011f07d2d5bde9c0710ac481e2b61fd9f51a77 (patch)
tree0cda17d78a9690ed7d2403735b77fa1979b1a81a /config.h
parent9b31bc189ce9ba08d9d22e1a63933a179df57fa2 (diff)
downloadcryptopp-git-d9011f07d2d5bde9c0710ac481e2b61fd9f51a77.tar.gz
Add ChaCha AVX2 implementation (GH #735)
Diffstat (limited to 'config.h')
-rw-r--r--config.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/config.h b/config.h
index 65131315..2d47cf5c 100644
--- a/config.h
+++ b/config.h
@@ -484,6 +484,11 @@ NAMESPACE_END
# define CRYPTOPP_DISABLE_ASM 1
#endif
+// SunCC prior to 5.10 cannot handle some SSE intrinsics
+#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5100)
+# define CRYPTOPP_DISABLE_ASM 1
+#endif
+
// Sun Studio 12 provides GCC inline assembly, http://blogs.oracle.com/x86be/entry/gcc_style_asm_inlining_support
// We can enable SSE2 for Sun Studio in the makefile with -D__SSE2__, but users may not compile with it.
#if !defined(CRYPTOPP_DISABLE_ASM) && !defined(__SSE2__) && defined(__x86_64__) && (__SUNPRO_CC >= 0x5100)
@@ -563,6 +568,22 @@ NAMESPACE_END
#define CRYPTOPP_AESNI_AVAILABLE 1
#endif
+// Requires Binutils 2.24
+#if !defined(CRYPTOPP_DISABLE_AVX) && defined(CRYPTOPP_SSE42_AVAILABLE) && \
+ (defined(__AVX2__) || (CRYPTOPP_MSC_VERSION >= 1800) || (__SUNPRO_CC >= 0x5130) || \
+ (CRYPTOPP_GCC_VERSION >= 40700) || (__INTEL_COMPILER >= 1400) || \
+ (CRYPTOPP_LLVM_CLANG_VERSION >= 30100) || (CRYPTOPP_APPLE_CLANG_VERSION >= 40600))
+#define CRYPTOPP_AVX_AVAILABLE 1
+#endif
+
+// Requires Binutils 2.24
+#if !defined(CRYPTOPP_DISABLE_AVX2) && defined(CRYPTOPP_AVX_AVAILABLE) && \
+ (defined(__AVX2__) || (CRYPTOPP_MSC_VERSION >= 1800) || (__SUNPRO_CC >= 0x5130) || \
+ (CRYPTOPP_GCC_VERSION >= 40700) || (__INTEL_COMPILER >= 1400) || \
+ (CRYPTOPP_LLVM_CLANG_VERSION >= 30100) || (CRYPTOPP_APPLE_CLANG_VERSION >= 40600))
+#define CRYPTOPP_AVX2_AVAILABLE 1
+#endif
+
// Guessing at SHA for SunCC. Its not in Sun Studio 12.6. Also see
// http://stackoverflow.com/questions/45872180/which-xarch-for-sha-extensions-on-solaris
#if !defined(CRYPTOPP_DISABLE_ASM) && !defined(CRYPTOPP_DISABLE_SHANI) && defined(CRYPTOPP_SSE42_AVAILABLE) && \