summaryrefslogtreecommitdiff
path: root/sha.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-08-24 08:13:23 -0400
committerGitHub <noreply@github.com>2018-08-24 08:13:23 -0400
commit1bbbfb6b7538e88f979c68aa70d6427ce2e98cc0 (patch)
treed96a2f70a7a526e09e42458593089d4429675052 /sha.cpp
parent243673c32acee63a7b0b23aeebac9b2ccfd80e7d (diff)
downloadcryptopp-git-1bbbfb6b7538e88f979c68aa70d6427ce2e98cc0.tar.gz
Fix partial specializations for FixedSizeAllocatorWithCleanup (PR #710)
Commit afbd3e60f68f effectively treated a symptom and not the underlying problem. The problem was linkers on 32-bit systems ignore CRYPTOPP_ALIGN_DAT(16) passed down by the compiler and align to 8-bytes or less. We have to use Wei's original code in some places. It is not a bad thing, but the bit fiddling is something we would like to contain a little more by depending more on language or platform features. This commit keeps the original changes which improve partial specializations; but fixes 32-bit linker behavior by effectively reverting afbd3e60f68f and e054d36dc88d00. We also add more comments so the next person has understands why things are done they way they are.
Diffstat (limited to 'sha.cpp')
-rw-r--r--sha.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/sha.cpp b/sha.cpp
index 73f1797f..b3ec31a7 100644
--- a/sha.cpp
+++ b/sha.cpp
@@ -1119,8 +1119,7 @@ CRYPTOPP_NAKED void CRYPTOPP_FASTCALL SHA512_HashBlock_SSE2(word64 *state, const
#define SSE2_CombineState(i) \
AS2( movdqu xmm0, [edi+i*16])\
- AS2( movdqu xmm1, [ecx+i*16])\
- AS2( paddq xmm0, xmm1)\
+ AS2( paddq xmm0, [ecx+i*16])\
AS2( movdqu [ecx+i*16], xmm0)
SSE2_CombineState(0)
@@ -1148,7 +1147,7 @@ CRYPTOPP_NAKED void CRYPTOPP_FASTCALL SHA512_HashBlock_SSE2(word64 *state, const
// ANONYMOUS_NAMESPACE_END
-#endif // CRYPTOPP_SSE2_ASM_AVAILABLE
+#endif // CRYPTOPP_SSE2_ASM_AVAILABLE
ANONYMOUS_NAMESPACE_BEGIN