summaryrefslogtreecommitdiff
path: root/sha.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-12-28 18:05:06 -0500
committerJeffrey Walton <noloader@gmail.com>2018-12-28 18:05:06 -0500
commitbe85db4de43fdc3f371d39829a1935e7f55103eb (patch)
treed3c64fb0cf7ecc01d691e86e2a5d03c6e36a0bd7 /sha.cpp
parent662db8fc872d65a1c409ba32fb8c4cfa28e3960e (diff)
downloadcryptopp-git-be85db4de43fdc3f371d39829a1935e7f55103eb.tar.gz
Restore unnamed namespace for SHA512_HashBlock_SSE2 (GH #684)
Diffstat (limited to 'sha.cpp')
-rw-r--r--sha.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/sha.cpp b/sha.cpp
index aa54af20..87cf749a 100644
--- a/sha.cpp
+++ b/sha.cpp
@@ -956,15 +956,16 @@ void SHA512::InitState(HashWordType *state)
#if CRYPTOPP_SSE2_ASM_AVAILABLE && (CRYPTOPP_BOOL_X86)
-// Anonymous namespace removed due to a new compile error.
+ANONYMOUS_NAMESPACE_BEGIN
+
+// No inlining due to https://github.com/weidai11/cryptopp/issues/684
// g++ -DNDEBUG -g2 -O3 -pthread -pipe -c sha.cpp
// sha.cpp: Assembler messages:
// sha.cpp:1155: Error: symbol `SHA512_Round' is already defined
// sha.cpp:1155: Error: symbol `SHA512_Round' is already defined
-// ANONYMOUS_NAMESPACE_BEGIN
-
-CRYPTOPP_NAKED void CRYPTOPP_FASTCALL SHA512_HashBlock_SSE2(word64 *state, const word64 *data)
+CRYPTOPP_NOINLINE CRYPTOPP_NAKED
+void CRYPTOPP_FASTCALL SHA512_HashBlock_SSE2(word64 *state, const word64 *data)
{
#ifdef __GNUC__
__asm__ __volatile__
@@ -1150,7 +1151,7 @@ CRYPTOPP_NAKED void CRYPTOPP_FASTCALL SHA512_HashBlock_SSE2(word64 *state, const
#endif
}
-// ANONYMOUS_NAMESPACE_END
+ANONYMOUS_NAMESPACE_END
#endif // CRYPTOPP_SSE2_ASM_AVAILABLE