summaryrefslogtreecommitdiff
path: root/vmac.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-09-21 13:57:37 -0400
committerJeffrey Walton <noloader@gmail.com>2016-09-21 13:57:37 -0400
commit6200029faae23710fa88638269e9272664509b91 (patch)
tree9e41722ab1106bb737e3b31f1de26d625e5dfa08 /vmac.cpp
parent1de8ca5774c2688f51b2c6e636a6507016ea8be9 (diff)
downloadcryptopp-git-6200029faae23710fa88638269e9272664509b91.tar.gz
Fix Clang 3.3 and 3.4 compiles (Issue 264)
Diffstat (limited to 'vmac.cpp')
-rw-r--r--vmac.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/vmac.cpp b/vmac.cpp
index a6662f21..d482cc7c 100644
--- a/vmac.cpp
+++ b/vmac.cpp
@@ -9,6 +9,13 @@
#include "argnames.h"
#include "secblock.h"
+#if defined(CRYPTOPP_DISABLE_VMAC_ASM)
+# undef CRYPTOPP_X86_ASM_AVAILABLE
+# undef CRYPTOPP_X32_ASM_AVAILABLE
+# undef CRYPTOPP_X64_ASM_AVAILABLE
+# undef CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
+#endif
+
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4731)
#endif
@@ -154,13 +161,13 @@ void VMAC_Base::HashEndianCorrectedBlock(const word64 *data)
unsigned int VMAC_Base::OptimalDataAlignment() const
{
return
-#if (CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)) && !defined(CRYPTOPP_DISABLE_VMAC_ASM)
+#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
HasSSE2() ? 16 :
#endif
GetCipher().OptimalDataAlignment();
}
-#if (CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE && (CRYPTOPP_BOOL_X86 || (CRYPTOPP_BOOL_X32 && !defined(CRYPTOPP_DISABLE_VMAC_ASM))))
+#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE && (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32)
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4731) // frame pointer register 'ebp' modified by inline assembly code
#endif
@@ -798,7 +805,7 @@ void VMAC_Base::VHASH_Update_Template(const word64 *data, size_t blocksRemaining
inline void VMAC_Base::VHASH_Update(const word64 *data, size_t blocksRemainingInWord64)
{
-#if (CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE && (CRYPTOPP_BOOL_X86 || (CRYPTOPP_BOOL_X32 && !defined(CRYPTOPP_DISABLE_VMAC_ASM))))
+#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE && (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32)
if (HasSSE2())
{
VHASH_Update_SSE2(data, blocksRemainingInWord64, 0);