summaryrefslogtreecommitdiff
path: root/sha.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2009-03-13 11:15:21 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2009-03-13 11:15:21 +0000
commit1c7bd8499b4eb0f5d0362661c86d9412f7c1bafc (patch)
treeb4cbd949b59bbf44f8e627d3b91c3556754b9d06 /sha.cpp
parent5411864299d2db1c7640dd03ab55d158db1e20e1 (diff)
downloadcryptopp-1c7bd8499b4eb0f5d0362661c86d9412f7c1bafc.tar.gz
fix compile on OpenSolaris 8.11
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@450 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'sha.cpp')
-rw-r--r--sha.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/sha.cpp b/sha.cpp
index b125127..a0f696c 100644
--- a/sha.cpp
+++ b/sha.cpp
@@ -14,10 +14,6 @@
#include "misc.h"
#include "cpu.h"
-#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
-#include <emmintrin.h>
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
// start of Steve Reid's code
@@ -230,12 +226,12 @@ static void CRYPTOPP_FASTCALL X86_SHA256_HashBlocks(word32 *state, const word32
#if defined(__GNUC__)
#if CRYPTOPP_BOOL_X64
- __m128i workspace[(LOCALS_SIZE+15)/16];
+ FixedSizeAlignedSecBlock<byte, LOCALS_SIZE> workspace;
#endif
__asm__ __volatile__
(
#if CRYPTOPP_BOOL_X64
- "movq %4, %%r8;"
+ "lea %4, %%r8;"
#endif
".intel_syntax noprefix;"
#elif defined(CRYPTOPP_GENERATE_X64_MASM)
@@ -420,7 +416,7 @@ static void CRYPTOPP_FASTCALL X86_SHA256_HashBlocks(word32 *state, const word32
:
: "c" (state), "d" (data), "S" (SHA256_K+48), "D" (len)
#if CRYPTOPP_BOOL_X64
- , "r" (workspace)
+ , "m" (workspace[0])
#endif
: "memory", "cc", "%eax"
#if CRYPTOPP_BOOL_X64