summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2007-09-24 07:05:29 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2007-09-24 07:05:29 +0000
commit5011c185406977b5c5f0549edac0d3f85d2e8db9 (patch)
tree98b8b6ce9ce96032956e2e99c319342327785392
parent770d6e4c74332cddfa7b561533258eab2c1dadde (diff)
downloadcryptopp-5011c185406977b5c5f0549edac0d3f85d2e8db9.tar.gz
fix compile with ICC 9.1 on x64
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@406 57ff6487-cd31-0410-9ec3-f628ee90f5f0
-rw-r--r--config.h2
-rw-r--r--integer.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/config.h b/config.h
index fff8a56..b2d6248 100644
--- a/config.h
+++ b/config.h
@@ -125,7 +125,7 @@ typedef unsigned int word32;
// define hword, word, and dword. these are used for multiprecision integer arithmetic
// Intel compiler won't have _umul128 until version 10.0. See http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30231625.aspx
-#if (defined(_MSC_VER) && (!defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1000) && (defined(_M_X64) || defined(_M_IA64))) || (defined(__DECCXX) && defined(__alpha__))
+#if (defined(_MSC_VER) && (!defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1000) && (defined(_M_X64) || defined(_M_IA64))) || (defined(__DECCXX) && defined(__alpha__)) || (defined(__INTEL_COMPILER) && defined(__x86_64__))
typedef word32 hword;
typedef word64 word;
#else
diff --git a/integer.cpp b/integer.cpp
index e8c2249..be5f416 100644
--- a/integer.cpp
+++ b/integer.cpp
@@ -187,6 +187,8 @@ public:
DWord r;
#ifdef CRYPTOPP_NATIVE_DWORD_AVAILABLE
r.m_whole = (dword)a * b;
+ #elif defined(__x86_64__)
+ asm ("mulq %3" : "=a"(r.m_halfs.low), "=d"(r.m_halfs.high) : "a"(a), "g"(b) : "cc");
#else
r.m_halfs.low = _umul128(a, b, &r.m_halfs.high);
#endif