summaryrefslogtreecommitdiff
path: root/whrlpool.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 /whrlpool.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 'whrlpool.cpp')
-rw-r--r--whrlpool.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/whrlpool.cpp b/whrlpool.cpp
index a947b813..49b030e4 100644
--- a/whrlpool.cpp
+++ b/whrlpool.cpp
@@ -77,10 +77,8 @@
// "Inline assembly operands don't work with .intel_syntax",
// http://llvm.org/bugs/show_bug.cgi?id=24232
#if defined(CRYPTOPP_DISABLE_INTEL_ASM)
-# undef CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
-# undef CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE
-# define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 0
-# define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 0
+# undef CRYPTOPP_SSE2_ASM_AVAILABLE
+# undef CRYPTOPP_SSSE3_ASM_AVAILABLE
#endif
NAMESPACE_BEGIN(CryptoPP)
@@ -128,7 +126,7 @@ void Whirlpool::TruncatedFinal(byte *hash, size_t size)
* employed).
*/
-#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
+#if CRYPTOPP_SSE2_ASM_AVAILABLE
CRYPTOPP_ALIGN_DATA(16) static const word64 Whirlpool_C[4*256+R] CRYPTOPP_SECTION_ALIGN16 = {
#else
static const word64 Whirlpool_C[4*256+R] = {
@@ -408,7 +406,7 @@ static const word64 Whirlpool_C[4*256+R] = {
// Whirlpool basic transformation. Transforms state based on block.
void Whirlpool::Transform(word64 *digest, const word64 *block)
{
-#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
+#if CRYPTOPP_SSE2_ASM_AVAILABLE
if (HasSSE2())
{
// MMX version has the same structure as C version below