mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 10:10:09 +01:00
swr/rast: _mm*_undefined_* implementations for gcc<4.9
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> (cherry picked from commitf0a22956be) Squashed with: swr: modifications to allow gcc-4.8 compilation Code unconditionally used avx2 intrinsics in the avx compilation. The simd intrinsics library we used has diverged significantly between branch and master; the non-“undefined intrinsics” portion is specific to the branch. This complements:f0a22956be“swr/rast: _mm*_undefined_* implementations for gcc<4.9” And makes this branch equivalent with the additional master patch:d50ef7332c“swr/rast: don't use _mm256_fmsub_ps in AVX code”
This commit is contained in:
parent
e1842e8acb
commit
7bd9eccbfe
2 changed files with 8 additions and 2 deletions
|
|
@ -171,6 +171,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
|
||||
|
|
|
|||
|
|
@ -405,8 +405,8 @@ INLINE simd16mask SIMDAPI _simd16_movemask_pd(simd16scalard a)
|
|||
|
||||
INLINE uint64_t SIMDAPI _simd16_movemask_epi8(simd16scalari a)
|
||||
{
|
||||
uint32_t mask_lo = _mm256_movemask_epi8(a.lo);
|
||||
uint32_t mask_hi = _mm256_movemask_epi8(a.hi);
|
||||
uint32_t mask_lo = _simd_movemask_epi8(a.lo);
|
||||
uint32_t mask_hi = _simd_movemask_epi8(a.hi);
|
||||
|
||||
return static_cast<uint64_t>(mask_lo) | (static_cast<uint64_t>(mask_hi) << 32);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue