audio: Fix same bug as last commit, but for _mm_bslli_si128 vs _mm_slli_si128.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 23 Jan 2017 12:06:10 -0500
changeset 10837c2f241c2f6ad
parent 10836 8f0aa225f261
child 10838 57ac8b68d7c8
audio: Fix same bug as last commit, but for _mm_bslli_si128 vs _mm_slli_si128.
src/audio/SDL_audiotypecvt.c
     1.1 --- a/src/audio/SDL_audiotypecvt.c	Mon Jan 23 12:02:02 2017 -0500
     1.2 +++ b/src/audio/SDL_audiotypecvt.c	Mon Jan 23 12:06:10 2017 -0500
     1.3 @@ -501,7 +501,7 @@
     1.4              const __m128d doubles1 = _mm_mul_pd(_mm_cvtepi32_pd(_mm_srli_si128(ints, 8)), divby2147483647);
     1.5              const __m128d doubles2 = _mm_mul_pd(_mm_cvtepi32_pd(ints), divby2147483647);
     1.6              /* convert to float32, bitshift/or to get these into a vector to store. */
     1.7 -            _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)))));
     1.8 +            _mm_store_ps(dst, _mm_castsi128_ps(_mm_or_si128(_mm_slli_si128(_mm_castps_si128(_mm_cvtpd_ps(doubles1)), 8), _mm_castps_si128(_mm_cvtpd_ps(doubles2)))));
     1.9              i -= 4; mmsrc++; dst += 4;
    1.10          }
    1.11          src = (const Sint32 *) mmsrc;
    1.12 @@ -725,7 +725,7 @@
    1.13              /* bitshift the whole register over, so _mm_cvtps_pd can read the top floats in the bottom of the vector. */
    1.14              const __m128d doubles1 = _mm_mul_pd(_mm_cvtps_pd(_mm_castsi128_ps(_mm_srli_si128(_mm_castps_si128(floats), 8))), mulby2147483647);
    1.15              const __m128d doubles2 = _mm_mul_pd(_mm_cvtps_pd(floats), mulby2147483647);
    1.16 -            _mm_store_si128(mmdst, _mm_or_si128(_mm_bslli_si128(_mm_cvtpd_epi32(doubles1), 8), _mm_cvtpd_epi32(doubles2)));
    1.17 +            _mm_store_si128(mmdst, _mm_or_si128(_mm_slli_si128(_mm_cvtpd_epi32(doubles1), 8), _mm_cvtpd_epi32(doubles2)));
    1.18              i -= 4; src += 4; mmdst++;
    1.19          }
    1.20          dst = (Sint32 *) mmdst;