[Mesa-dev] [PATCH 1/3] swr/rast: _mm*_undefined_* implementations for gcc<4.9

Cherniak, Bruce bruce.cherniak at intel.com
Thu Jul 6 19:36:50 UTC 2017


Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>

> On Jul 6, 2017, at 11:26 AM, Tim Rowley <timothy.o.rowley at intel.com> wrote:
> 
> Define these in terms of setzero for ancient gcc versions which don't
> have the undefined intrinsics.
> 
> Cc: mesa-stable at lists.freedesktop.org
> ---
> src/gallium/drivers/swr/rasterizer/common/os.h | 6 ++++++
> 1 file changed, 6 insertions(+)
> 
> diff --git a/src/gallium/drivers/swr/rasterizer/common/os.h b/src/gallium/drivers/swr/rasterizer/common/os.h
> index 6e4d98f..8657709 100644
> --- a/src/gallium/drivers/swr/rasterizer/common/os.h
> +++ b/src/gallium/drivers/swr/rasterizer/common/os.h
> @@ -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
> -- 
> 2.7.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list