eal: remove unneeded conditionals for SSE headers
[dpdk.git] / lib / librte_eal / common / include / arch / x86 / rte_vect.h
index d5bcdb9..03fc991 100644 (file)
@@ -31,8 +31,8 @@
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef _RTE_VECT_H_
-#define _RTE_VECT_H_
+#ifndef _RTE_VECT_X86_H_
+#define _RTE_VECT_X86_H_
 
 /**
  * @file
  * RTE SSE/AVX related header.
  */
 
-#if (defined(__ICC) || (__GNUC__ == 4 &&  __GNUC_MINOR__ < 4))
-
-#ifdef __SSE__
-#include <xmmintrin.h>
-#endif
+#include <stdint.h>
+#include "generic/rte_vect.h"
 
-#ifdef __SSE2__
-#include <emmintrin.h>
-#endif
+#if (defined(__ICC) || (__GNUC__ == 4 &&  __GNUC_MINOR__ < 4))
 
-#if defined(__SSE4_2__) || defined(__SSE4_1__)
-#include <smmintrin.h>
-#endif
+#include <smmintrin.h> /* SSE4 */
 
 #if defined(__AVX__)
 #include <immintrin.h>
@@ -102,7 +95,8 @@ typedef union rte_ymm {
 #endif /* __AVX__ */
 
 #ifdef RTE_ARCH_I686
-#define _mm_cvtsi128_si64(a) ({ \
+#define _mm_cvtsi128_si64(a)    \
+__extension__ ({                \
        rte_xmm_t m;            \
        m.x = (a);              \
        (m.u64[0]);             \
@@ -113,7 +107,8 @@ typedef union rte_ymm {
  * Prior to version 12.1 icc doesn't support _mm_set_epi64x.
  */
 #if (defined(__ICC) && __ICC < 1210)
-#define _mm_set_epi64x(a, b)  ({ \
+#define _mm_set_epi64x(a, b)     \
+__extension__ ({                 \
        rte_xmm_t m;             \
        m.u64[0] = b;            \
        m.u64[1] = a;            \
@@ -125,4 +120,4 @@ typedef union rte_ymm {
 }
 #endif
 
-#endif /* _RTE_VECT_H_ */
+#endif /* _RTE_VECT_X86_H_ */