summaryrefslogtreecommitdiff
path: root/vmac.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-08-20 21:25:29 -0400
committerGitHub <noreply@github.com>2017-08-20 21:25:29 -0400
commit7851a0d5106dfb287f30ca0432285c15c679cf96 (patch)
tree423349ba4932a494b582cb839547e6fe78fc2f99 /vmac.cpp
parentbac3c1cc40904407500fbc0e097ffb54b7553382 (diff)
downloadcryptopp-git-7851a0d5106dfb287f30ca0432285c15c679cf96.tar.gz
Remove BOOL macro value (GH #462)
Currently the CRYPTOPP_BOOL_XXX macros set the macro value to 0 or 1. If we remove setting the 0 value (the #else part of the expression), then the self tests speed up by about 0.3 seconds. I can't explain it, but I have observed it repeatedly. This check-in prepares for the removal in Upstream master
Diffstat (limited to 'vmac.cpp')
-rw-r--r--vmac.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/vmac.cpp b/vmac.cpp
index 30eee34d..8978a73a 100644
--- a/vmac.cpp
+++ b/vmac.cpp
@@ -13,7 +13,7 @@
# undef CRYPTOPP_X86_ASM_AVAILABLE
# undef CRYPTOPP_X32_ASM_AVAILABLE
# undef CRYPTOPP_X64_ASM_AVAILABLE
-# undef CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
+# undef CRYPTOPP_SSE2_ASM_AVAILABLE
#endif
#if CRYPTOPP_MSC_VERSION
@@ -161,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)
+#if CRYPTOPP_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)
+#if CRYPTOPP_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
@@ -800,7 +800,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)
+#if CRYPTOPP_SSE2_ASM_AVAILABLE && (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32)
if (HasSSE2())
{
VHASH_Update_SSE2(data, blocksRemainingInWord64, 0);