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
pull/450/head
Jeffrey Walton 2017-07-23 11:14:02 -04:00
parent 00f9818b5d
commit 5103f6dd41
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 3 additions and 11 deletions

View File

@ -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.