summaryrefslogtreecommitdiff
path: root/salsa.cpp
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2007-05-05 15:25:12 +0000
committerweidai <weidai11@users.noreply.github.com>2007-05-05 15:25:12 +0000
commit3dfcdf8c443a19413ceed019a7f4ad1850ab69bd (patch)
tree21cf5afdb251d3c59ab8448e856eaf4d51079d24 /salsa.cpp
parent87356fd44e9786d8568cee248fe3c37c2280402e (diff)
downloadcryptopp-git-3dfcdf8c443a19413ceed019a7f4ad1850ab69bd.tar.gz
work around GCC bug for x64
Diffstat (limited to 'salsa.cpp')
-rwxr-xr-xsalsa.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/salsa.cpp b/salsa.cpp
index f7e87d74..3d988ee9 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];