Cannot use SSSE3 with processor on

I have a Xeon W3550 processor that should support the SSE4.2 instruction set, but when I try to use something from SSE2 in my c program, I get a compiler error, for example.

#error "SSE4.2 instruction set not enabled" 

When i use

 $cat /procs/cpuinfo 

it discovers all the relevant sse command sets, but

 $cpuid 

detects only SSE and SSE2.

My operating system is ubuntu 11.04 with a 2.6.38-11-generic kernel.

Any ideas on how to fix this? Thanks.

EDIT: An update based on Steve-o's comment below. The header files <* mmintrin.h> perform a check for the sse version with which they are associated using the #ifndef preprocessor directive, for example.

 #ifndef __SSSE3__ #error "SSSE3 instruction set not enabled". 

So, I think, the question is why is this coming back even though the SSSE3 processor is on.

+6
source share
1 answer

Have you tried creating with -msse4.2 ?

  • Support for built-in SSE4.2 functions and code generation available through -msse4.2.
  • Support for SSE4.1 and SSE4.2 can be enabled via -msse4.

http://gcc.gnu.org/gcc-4.3/changes.html

+11
source

Source: https://habr.com/ru/post/895720/


All Articles