From 621a2887f9ae17c5bd3a6e120031b4b0b8362381 Mon Sep 17 00:00:00 2001 From: weidai Date: Sat, 5 May 2007 15:25:12 +0000 Subject: work around GCC bug for x64 git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@361 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- salsa.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'salsa.cpp') diff --git a/salsa.cpp b/salsa.cpp index f7e87d7..3d988ee 100755 --- a/salsa.cpp +++ b/salsa.cpp @@ -90,11 +90,12 @@ void Salsa20_Policy::OperateKeystream(KeystreamOperation operation, byte *output { __m128i *s = (__m128i *)m_state.data(); -#if CRYPTOPP_GCC_VERSION >= 40000 || _MSC_VER > 1400 || (defined(_MSC_VER) && CRYPTOPP_BOOL_X86) +#if _MSC_VER > 1400 || (defined(_MSC_VER) && CRYPTOPP_BOOL_X86) || (CRYPTOPP_GCC_VERSION >= 40000 && CRYPTOPP_BOOL_X86) // This code triggers an internal compiler error on MSVC 2005 when compiling // for x64 with optimizations on. hopefully it will get fixed in the next release. // A bug report has been submitted at http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=274123 // Also, GCC 3.4.4 generates incorrect code for x86 at -O2. + // GCC 4.1.1 generates incorrect code for x64 at -O2 if (iterationCount >= 4) { __m128i ss[16]; -- cgit v1.2.1