Fix MMX on 32 bit x86.

pull/1374/head
Jussi Pakkanen 8 years ago
parent 2181d8f2ab
commit f6f5644212
  1. 6
      test cases/common/139 simd/simd_mmx.c

@ -44,7 +44,11 @@ void increment_mmx(float arr[4]) {
__m64 packed = _mm_set_pi16(arr[3], arr[2], arr[1], arr[0]);
__m64 incr = _mm_set1_pi16(1);
__m64 result = _mm_add_pi16(packed, incr);
int64_t unpacker = _m_to_int64(result);
/* Should be
* int64_t unpacker = _m_to_int64(result);
* but it does not exist on 32 bit platforms for some reason.
*/
int64_t unpacker = (int64_t)(result);
_mm_empty();
for(i=0; i<4; i++) {
arr[i] = (float)(unpacker & ((1<<16)-1));

Loading…
Cancel
Save