*===-----------------------------------------------------------------------===
*/
-#ifndef __AVXINTRIN_H
-#define __AVXINTRIN_H
-
-#ifndef __AVX__
-#error "AVX instruction set not enabled"
-#else
+#ifndef __IMMINTRIN_H
+#error "Never use <avxintrin.h> directly; include <immintrin.h> instead."
+#endif
typedef double __v4df __attribute__ ((__vector_size__ (32)));
typedef float __v8sf __attribute__ ((__vector_size__ (32)));
__m128i zero = _mm_setzero_si128();
return __builtin_shufflevector(in, zero, 0, 1, 2, 2);
}
-
-#endif /* __AVX__ */
-
-#endif /* __AVXINTRIN_H */
#if defined(i386) || defined(__x86_64__)
-# if defined(__MMX__)
-#include <emmintrin.h>
+#ifdef __MMX__
#include <mm_malloc.h>
-# endif
-
-# if defined(__SSE__)
-#include <xmmintrin.h>
-# endif
-
-# if defined(__SSE3__)
-#include <pmmintrin.h>
-# endif
-
-# if defined(__SSSE3__)
-#include <tmmintrin.h>
-# endif
-
-# if defined(__SSE4_1__)
-#include <smmintrin.h>
-# endif
+#endif
-# if defined(__SSE4_2__)
+#ifdef __SSE4_2__
+// nmmintrin forwards to smmintrin.
#include <nmmintrin.h>
-# endif
+#endif
-# if defined(__AVX__)
-#include <avxintrin.h>
-# endif
+// immintrin includes all other intel intrinsic headers.
+#include <immintrin.h>
#endif