Where the fact that -msse2 has to be used with -O documented?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The following commands showed that -msse2 has to be used with -O (or
its variants -O1, -O2, etc.) But I don't find this documented in the
gcc manual. Does anybody know where this is documented? Thanks!

~/linux/test/cpp/sse2/_mm_load_ps$ g++ -msse2 main.cpp -O -o main.exe
~/linux/test/cpp/sse2/_mm_load_ps$ ./main.exe
1
2
3
4
~/linux/test/cpp/sse2/_mm_load_ps$ g++ -msse2 main.cpp -o main.exe
~/linux/test/cpp/sse2/_mm_load_ps$ ./main.exe
Segmentation fault: 11



#include <xmmintrin.h>
#include <stdio.h>

int main() {
  float p[4]={1,2,3,4};
  __m128 a = _mm_load_ps(p);
  float p1[4];
  _mm_store_ps(p1, a);
  for(int i=0; i < 4; i++) {
    printf("%g\n", p1[i]);
  }
}

-- 
Regards,
Peng


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux