summaryrefslogtreecommitdiff
path: root/salsa.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 /salsa.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 'salsa.cpp')
-rwxr-xr-xsalsa.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/salsa.cpp b/salsa.cpp
index 57576dc..bd216ee 100755
--- a/salsa.cpp
+++ b/salsa.cpp
@@ -11,10 +11,6 @@
#include "argnames.h"
#include "cpu.h"
-#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
-#include <emmintrin.h>
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
void Salsa20_TestInstantiations()
@@ -136,7 +132,7 @@ void Salsa20_Policy::OperateKeystream(KeystreamOperation operation, byte *output
#define REG_temp rdx
#define SSE2_WORKSPACE %5
- __m128i workspace[32];
+ FixedSizeAlignedSecBlock<byte, 32*16> workspace;
#else
#define REG_output edi
#define REG_input eax
@@ -463,7 +459,7 @@ void Salsa20_Policy::OperateKeystream(KeystreamOperation operation, byte *output
".att_syntax prefix;"
:
#if CRYPTOPP_BOOL_X64
- : "r" (m_rounds), "r" (input), "r" (iterationCount), "r" (m_state.data()), "r" (output), "r" (workspace)
+ : "r" (m_rounds), "r" (input), "r" (iterationCount), "r" (m_state.data()), "r" (output), "r" (workspace.m_ptr)
: "%eax", "%edx", "memory", "cc", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7", "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15"
#else
: "d" (m_rounds), "a" (input), "c" (iterationCount), "S" (m_state.data()), "D" (output)