summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2010-08-04 23:42:11 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2010-08-04 23:42:11 +0000
commit2b729488b9a3944a384bdaa13fecc34b3ba6de92 (patch)
tree0801b243f9a552ec3c55a7fa9d2877426f7b82c7
parent2b1577950ce6e9cfd3bdd1007260d0dd90ca2003 (diff)
downloadcryptopp-2b729488b9a3944a384bdaa13fecc34b3ba6de92.tar.gz
fix compile with Intel C++ Compiler 11.1
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@515 57ff6487-cd31-0410-9ec3-f628ee90f5f0
-rw-r--r--GNUmakefile6
-rwxr-xr-xcpu.h6
2 files changed, 8 insertions, 4 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 164ed7d..2513231 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -26,6 +26,7 @@ ifeq ($(ISX86),1)
GCC42_OR_LATER = $(shell $(CXX) -v 2>&1 | $(EGREP) -c "^gcc version (4.[2-9]|[5-9])")
INTEL_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\)")
+ICC111_OR_LATER = $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\) ([2-9][0-9]|1[2-9]|11\.[1-9])")
GAS210_OR_LATER = $(shell echo "" | $(AS) -v 2>&1 | $(EGREP) -c "GNU assembler version (2\.[1-9][0-9]|[3-9])")
GAS217_OR_LATER = $(shell echo "" | $(AS) -v 2>&1 | $(EGREP) -c "GNU assembler version (2\.1[7-9]|2\.[2-9]|[3-9])")
ISMINGW = $(shell $(CXX) --version 2>&1 | $(EGREP) -c "mingw")
@@ -39,10 +40,13 @@ endif
endif
ifneq ($(INTEL_COMPILER),0)
-# "internal error: backend signals" occurs on some x86 inline assembly with ICC 9 and some x64 inline assembly with ICC 11
+CXXFLAGS += -wd68 -wd186 -wd279 -wd327
+ifeq ($(ICC111_OR_LATER),0)
+# "internal error: backend signals" occurs on some x86 inline assembly with ICC 9 and some x64 inline assembly with ICC 11.0
# if you want to use Crypto++'s assembly code with ICC, try enabling it on individual files
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
endif
+endif
ifeq ($(GAS210_OR_LATER),0) # .intel_syntax wasn't supported until GNU assembler 2.10
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
diff --git a/cpu.h b/cpu.h
index 79d612e..65029d3 100755
--- a/cpu.h
+++ b/cpu.h
@@ -17,7 +17,7 @@
#endif
#if CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE
-#if !defined(__GNUC__) || defined(__SSSE3__)
+#if !defined(__GNUC__) || defined(__SSSE3__) || defined(__INTEL_COMPILER)
#include <tmmintrin.h>
#else
__inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
@@ -27,7 +27,7 @@ _mm_shuffle_epi8 (__m128i a, __m128i b)
return a;
}
#endif
-#if !defined(__GNUC__) || defined(__SSE4_1__)
+#if !defined(__GNUC__) || defined(__SSE4_1__) || defined(__INTEL_COMPILER)
#include <smmintrin.h>
#else
__inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__))
@@ -44,7 +44,7 @@ _mm_insert_epi32 (__m128i a, int b, const int i)
return a;
}
#endif
-#if !defined(__GNUC__) || (defined(__AES__) && defined(__PCLMUL__))
+#if !defined(__GNUC__) || (defined(__AES__) && defined(__PCLMUL__)) || defined(__INTEL_COMPILER)
#include <wmmintrin.h>
#else
__inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))