|
From: Andrew S. <ver...@ya...> - 2013-07-09 00:22:19
|
Hello,
I'm using GCC-TDM 4.7.1-2 and I tried to compile the following code using GCC with the compiler flags -msse3 -msse4 -mxop but there seems to be a problem only
if the header x86intrin.h is included.
If I run the code through GDB I get a seg fault in emmintrin.h on line 603 where it says:
return __extension__ (__m128i)(__v16qi){
If I comment out x86intrin.h I can run the program with the line
__m128i HADDQinput = _mm_set_epi8(4, 3, 2, 1, 8, 7, 5, 3, 7, 6, 5, 4, 9, 0, 3, 3); //line 14
no trouble. Its only when x86intrin.h is compiled with the source below a crash occurs.
#include <emmintrin.h>
#include <x86intrin.h>//code compiles and runs fine without this header but otherwise causes a seg fault in emmintrin.h line 603
#include <stdio.h>
#include <stdint.h>
void print_2_64_bit_ints(const char * label, __m128i m64_r)
{
int *val = (int *) &m64_r;
printf("%s: %d %d\n",
label, val[0], val[1]);
}
int main()
{
__m128i HADDQinput = _mm_set_epi8(4, 3, 2, 1, 8, 7, 5, 3, 7, 6, 5, 4, 9, 0, 3, 3);//line 14
//__m128i RESULT = _mm_haddq_epi8(HADDQinput);
//_mm_empty();
//print_2_64_bit_ints("Result ", RESULT);
return 0;
}
thanks,
Andrew
|