Fix more build errors/warnings after recent AVX changes

Thanks to Sergey and Ray for the help identifying the problem.
This commit is contained in:
Brecht Van Lommel 2020-04-02 17:25:48 +02:00
parent 343a874831
commit 868d4526a8
2 changed files with 9 additions and 1 deletions

View File

@ -266,7 +266,8 @@ template<size_t i0> __forceinline const avxf shuffle(const avxf &a)
template<size_t i> __forceinline float extract(const avxf &a)
{
return _mm256_cvtss_f32(shuffle<i, i, i, i>(a).m256);
__m256 b = shuffle<i, i, i, i>(a).m256;
return _mm256_cvtss_f32(b);
}
template<> __forceinline float extract<0>(const avxf &a)
{

View File

@ -588,6 +588,13 @@ __forceinline __m128 _mm_round_ps_emu(__m128 value, const int flags)
# endif /* !(defined(__KERNEL_SSE41__) || defined(__SSE4_1__) || defined(__SSE4_2__)) */
/* Older GCC versions do not have _mm256_cvtss_f32 yet, so define it ourselves.
* _mm256_castps256_ps128 generates no instructions so this is jus as efficient. */
# ifdef __KERNEL_AVX__
# undef _mm256_cvtss_f32
# define _mm256_cvtss_f32(a) (_mm_cvtss_f32(_mm256_castps256_ps128(a)))
# endif
# else /* __KERNEL_SSE2__ */
/* This section is for utility functions which operates on non-register data