How to test if your Linux Support SSE2

后端 未结 5 886
迷失自我
迷失自我 2021-02-04 06:17

Actually I have 2 questions:

  1. Is SSE2 Compatibility a CPU issue or Compiler issue?
  2. How to check if your CPU or Compiler support SSE2?

I am u

5条回答
  •  一个人的身影
    2021-02-04 06:58

    The CPU needs to be able to execute SSE2 instrcutions, and the compiler needs to be able to generate them.

    To check if your cpu supports SSE2:

    # cat /proc/cpuinfo
    

    It will be somewhere under "flags" if it is supported.

    Update: So you cpu doesn't support it.

    For the compiler:

    # gcc -dumpmachine
    # gcc --version
    

    Target of your compiler needs to a kind of x86*, since only this cpus support sse2, which is part of the x86 instruction set

    AND

    gcc version needs to be >= 3.1 (most likely, since this is about 10 years old or something) for supporting SSE2.

    Update: So your compiler doesn't support it on this target, it will if you are using it as a cross compiler for x86.

提交回复
热议问题