swr/rast: _mm*_undefined_* implementations for gcc<4.9
authorTim Rowley <timothy.o.rowley@intel.com>
Thu, 6 Jul 2017 15:28:53 +0000 (10:28 -0500)
committerTim Rowley <timothy.o.rowley@intel.com>
Thu, 6 Jul 2017 20:00:28 +0000 (15:00 -0500)
Define these in terms of setzero for ancient gcc versions which don't
have the undefined intrinsics.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/common/os.h

index 6e4d98f13fc00975dc8ab0ee3314917f158d294c..8657709405984dc32a58b26939c42332520f0c46 100644 (file)
@@ -173,6 +173,12 @@ void _mm256_storeu2_m128i(__m128i *hi, __m128i *lo, __m256i a)
     _mm_storeu_si128((__m128i*)lo, _mm256_castsi256_si128(a));
     _mm_storeu_si128((__m128i*)hi, _mm256_extractf128_si256(a, 0x1));
 }
+
+// gcc prior to 4.9 doesn't have _mm*_undefined_*
+#if (__GNUC__) && (GCC_VERSION < 409000)
+#define _mm_undefined_si128 _mm_setzero_si128
+#define _mm256_undefined_ps _mm256_setzero_ps
+#endif
 #endif
 
 inline