summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-07-23 11:14:02 -0400
committerJeffrey Walton <noloader@gmail.com>2017-07-23 11:14:02 -0400
commit5103f6dd41db8cc7bac62a6160d3e803596de56d (patch)
treeb28879d321735c8770046bac2e813d5e16b6ea75 /config.h
parent00f9818b5d8e5aeb6c1057aa395317635bae07a3 (diff)
downloadcryptopp-git-5103f6dd41db8cc7bac62a6160d3e803596de56d.tar.gz
Remove gyrations around CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
CRYPTOPP_NO_UNALIGNED_DATA_ACCESS was required in Crypto++ 5.6 and earlier because unaligned data access was the norm. It caused problems at -O3 and on ARM NEON. At Crypto++ 6.0 no unaligned data access became a first class citizen. Folks who want to allow it must now define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
Diffstat (limited to 'config.h')
-rw-r--r--config.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/config.h b/config.h
index 6a9c8711..32884f22 100644
--- a/config.h
+++ b/config.h
@@ -54,11 +54,9 @@
# endif
#endif
-// Define this to ensure C/C++ standard compliance and respect for GCC aliasing rules and other alignment fodder. If you
-// experience a break with GCC at -O3, you should try this first. Guard it in case its set on the command line (and it differs).
-#ifndef CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
-# define CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
-#endif
+// Define this to allow unaligned data access. If you experience a break with
+// GCC at -O3, you should immediately suspect unaligned data accesses.
+// #define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
// ***************** Less Important Settings ***************
@@ -580,12 +578,6 @@ NAMESPACE_END
#define CRYPTOPP_BOOL_ARM64 0
#endif
-#if !defined(CRYPTOPP_NO_UNALIGNED_DATA_ACCESS) && !defined(CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS)
-#if (CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || defined(__powerpc__) || (__ARM_FEATURE_UNALIGNED >= 1))
- #define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
-#endif
-#endif
-
// ***************** Initialization and Constructor priorities ********************
// CRYPTOPP_INIT_PRIORITY attempts to manage initialization of C++ static objects.