diff options
author | Jeffrey Walton <noloader@gmail.com> | 2020-04-03 00:57:15 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2020-04-03 00:57:15 -0400 |
commit | 76c92e019fed6a824835125fa9d20acfa207fffb (patch) | |
tree | 42f35f109b3a10e18e5f8473895d26109411a83e /rijndael.cpp | |
parent | dc1d0bcf2fe6d73ec8f62e65523ad8725408e149 (diff) | |
download | cryptopp-git-76c92e019fed6a824835125fa9d20acfa207fffb.tar.gz |
Align Rijdael SIMD data to natural alignment
This should provide a small speedup and avoid problems with loads using 32-bit pointers
Diffstat (limited to 'rijndael.cpp')
-rw-r--r-- | rijndael.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rijndael.cpp b/rijndael.cpp index 1c3bc295..75a1b1b3 100644 --- a/rijndael.cpp +++ b/rijndael.cpp @@ -250,19 +250,19 @@ unsigned int Rijndael::Base::OptimalDataAlignment() const {
#if (CRYPTOPP_AESNI_AVAILABLE)
if (HasAESNI())
- return 1;
+ return GetAlignmentOf<word32>();
#endif
#if (CRYPTOPP_ARM_AES_AVAILABLE)
if (HasAES())
- return 1;
+ return GetAlignmentOf<word32>();
#endif
#if (CRYPTOGAMS_ARM_AES)
if (HasARMv7())
- return 1;
+ return GetAlignmentOf<word32>();
#endif
#if (CRYPTOPP_POWER8_AES_AVAILABLE)
if (HasAES())
- return 1;
+ return GetAlignmentOf<word32>();
#endif
return BlockTransformation::OptimalDataAlignment();
}
|