SIMD intrinsic function "_mm_store_si128" illegal in GCC?

Lingchuan (LC) Meng lingchuanmeng@gmail.com
Thu Aug 20 17:35:00 GMT 2009


Hi all,

When vectorizing some of my integer code, I had this "Illegal
instruction" problem with SIMD intrinsics in GCC. I believe the error
is triggered by the instruction:

_mm_store_si128((__m128i *)c, v2);

where C and v2 are defined as:

int c[4] __attribute__((aligned(16))) = {0, 0, 0, 0};
__m128i  v2;

And the CFLAGS is

 -I/usr/local/papi-3.6.1/include -L/usr/local/papi-3.6.1/lib/ -lpapi
-lm -O2 -msse4.1 -fno-inline-small-functions

I searched around when starting with SIMD intrinsics, and didn't find
a complete instruction set for GCC. So I end up using something
similar from MSDN.

What's the legal intrinsic function in GCC to store a __m128i vector
back to an integer array?

Thanks,

LC



More information about the Gcc-help mailing list