[dpdk-dev] [PATCH] common/rte_memcpy: Fix x86intrin.h missed
Michael Qiu
michael.qiu at intel.com
Fri Mar 13 08:02:59 CET 2015
rte_memcpy.h(46): catastrophic error: cannot open source file "x86intrin.h"
For icc and old gcc, this header is not included.
Signed-off-by: Michael Qiu <michael.qiu at intel.com>
---
lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
index ac72069..bd10d36 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
@@ -43,7 +43,27 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
+#if (defined(__ICC) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
+
+#ifdef __SSE__
+#include <xmmintrin.h>
+#endif
+
+#ifdef __SSE2__
+#include <emmintrin.h>
+#endif
+
+#if defined(__SSE4_2__) || defined(__SSE4_1__)
+#include <smmintrin.h>
+#endif
+
+#if defined(__AVX__)
+#include <immintrin.h>
+#endif
+
+#else
#include <x86intrin.h>
+#endif
#ifdef __cplusplus
extern "C" {
--
1.9.3
More information about the dev
mailing list