From fab4501811ff3e406deaf91390cc9fff7be065d8 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 23 Jan 2017 12:02:02 -0500 Subject: [PATCH] audio: use _mm_srli_si128 instead of _mm_bsrli_si128. They're the same thing (one is generally a #define of the other), but some toolchains don't offer the 'b' version. --- src/audio/SDL_audiotypecvt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio/SDL_audiotypecvt.c b/src/audio/SDL_audiotypecvt.c index 91e9c6458c519..9be7629e46b5b 100644 --- a/src/audio/SDL_audiotypecvt.c +++ b/src/audio/SDL_audiotypecvt.c @@ -498,7 +498,7 @@ SDL_Convert_S32_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) while (i >= 4) { /* 4 * sint32 */ const __m128i ints = _mm_load_si128(mmsrc); /* bitshift the whole register over, so _mm_cvtepi32_pd can read the top ints in the bottom of the vector. */ - const __m128d doubles1 = _mm_mul_pd(_mm_cvtepi32_pd(_mm_bsrli_si128(ints, 8)), divby2147483647); + const __m128d doubles1 = _mm_mul_pd(_mm_cvtepi32_pd(_mm_srli_si128(ints, 8)), divby2147483647); const __m128d doubles2 = _mm_mul_pd(_mm_cvtepi32_pd(ints), divby2147483647); /* convert to float32, bitshift/or to get these into a vector to store. */ _mm_store_ps(dst, _mm_castsi128_ps(_mm_or_si128(_mm_bslli_si128(_mm_castps_si128(_mm_cvtpd_ps(doubles1)), 8), _mm_castps_si128(_mm_cvtpd_ps(doubles2))))); @@ -723,7 +723,7 @@ SDL_Convert_F32_to_S32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) while (i >= 4) { /* 4 * float32 */ const __m128 floats = _mm_load_ps(src); /* bitshift the whole register over, so _mm_cvtps_pd can read the top floats in the bottom of the vector. */ - const __m128d doubles1 = _mm_mul_pd(_mm_cvtps_pd(_mm_castsi128_ps(_mm_bsrli_si128(_mm_castps_si128(floats), 8))), mulby2147483647); + const __m128d doubles1 = _mm_mul_pd(_mm_cvtps_pd(_mm_castsi128_ps(_mm_srli_si128(_mm_castps_si128(floats), 8))), mulby2147483647); const __m128d doubles2 = _mm_mul_pd(_mm_cvtps_pd(floats), mulby2147483647); _mm_store_si128(mmdst, _mm_or_si128(_mm_bslli_si128(_mm_cvtpd_epi32(doubles1), 8), _mm_cvtpd_epi32(doubles2))); i -= 4; src += 4; mmdst++;