summaryrefslogtreecommitdiff
path: root/gcm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gcm.cpp')
-rw-r--r--gcm.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcm.cpp b/gcm.cpp
index 610db97..84f6f91 100644
--- a/gcm.cpp
+++ b/gcm.cpp
@@ -15,8 +15,8 @@
#endif
#if CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE
-#include <tmmintrin.h>
-#include <wmmintrin.h>
+#include <tmmintrin.h>
+#include <wmmintrin.h>
#endif
NAMESPACE_BEGIN(CryptoPP)
@@ -336,7 +336,11 @@ void GCM_Base::Resync(const byte *iv, size_t len)
unsigned int GCM_Base::OptimalDataAlignment() const
{
- return HasSSE2() ? 16 : GetBlockCipher().OptimalDataAlignment();
+ return
+#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
+ HasSSE2() ? 16 :
+#endif
+ GetBlockCipher().OptimalDataAlignment();
}
#pragma warning(disable: 4731) // frame pointer register 'ebp' modified by inline assembly code