summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-04-12 23:28:41 -0400
committerJeffrey Walton <noloader@gmail.com>2017-04-12 23:28:41 -0400
commit59767be52e2537bf8460f211f57b4739c9b02dcb (patch)
tree26b64adaaf58e9a676e3a8165f3005c2c9eb26d9 /config.h
parentf44e705c16265f89264491756677758866e165dc (diff)
downloadcryptopp-git-59767be52e2537bf8460f211f57b4739c9b02dcb.tar.gz
Add Intel and ARM intrinsics
Win32 and Win64 benefited from the Intel intrinsics. A32 and Aarch64 benefited from the ARM intrinsics. The intrinsics shaved 150 to 350 cycles from key setup. The intrinsics slowed modern GCC down a small bit, and did not appear to affect old GCC. As such, Intel intrinsics were only enabled for Microsoft compilers. We were not able to improve encryption and decryption. In fact, some of the attempted macro conversions and intrinsics attempts slowed things down considerably. For example, GCC 5.4 on x86_64 went from 120 MB/s to about 70 MB/s when we tried to improve code around the Key XOR Layer (ARIA_KXL).
Diffstat (limited to 'config.h')
-rw-r--r--config.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/config.h b/config.h
index 1d96fbd4..3109d56c 100644
--- a/config.h
+++ b/config.h
@@ -402,7 +402,7 @@ NAMESPACE_END
#define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 0
#endif
- #if !defined(CRYPTOPP_DISABLE_SSE3) && (_MSC_VER >= 1500 || (defined(__SSE3__) && defined(__SSSE3__)))
+ #if !defined(CRYPTOPP_DISABLE_SSSE3) && (_MSC_VER >= 1500 || (defined(__SSSE3__) && defined(__SSSE3__)))
#define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 1
#else
#define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 0
@@ -423,6 +423,12 @@ NAMESPACE_END
#define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 0
#endif
+#if !defined(CRYPTOPP_DISABLE_SSSE3) && (_MSC_VER >= 1500 || defined(__GNUC__) || (defined(__SSSE3__) && defined(__SSSE3__)))
+ #define CRYPTOPP_BOOL_SSSE3_INTRINSICS_AVAILABLE 1
+#else
+ #define CRYPTOPP_BOOL_SSSE3_INTRINSICS_AVAILABLE 0
+#endif
+
// Intrinsics availible in GCC 4.3 (http://gcc.gnu.org/gcc-4.3/changes.html) and
// MSVC 2008 (http://msdn.microsoft.com/en-us/library/bb892950%28v=vs.90%29.aspx)
// SunCC could generate SSE4 at 12.1, but the intrinsics are missing until 12.4.