-msse4.1 causes "SSE4.2 instruction set not enabled"
Xi Ruoyao
ryxi@stu.xidian.edu.cn
Wed Aug 9 04:59:00 GMT 2017
On 2017-08-08 23:48 -0400, Jeffrey Walton wrote:
> Hi Everyone,
>
> I'm working on fully patched Solaris 11.3 that uses GCC 4.8.2 compiler.
>
> $ cat test.cxx
> #if defined(__SSE4_1__)
> # include <emmintrin.h>
> # include <nmmintrin.h>
Use <smmintrin.h>.
Or, upgrade to GCC 5.
> #endif
>
> int main(int argc, char* argv[])
> {
> Â Â Â Â int x = _mm_extract_epi32(_mm_set_epi32(01,1,2,3), 0);
> Â Â Â Â return 0;
> }
>
> $ g++ -msse4.1 -m64 test.cxx -c
> In file included from test.cxx:3:0:
> /usr/gcc/4.8/lib/gcc/i386-pc-solaris2.11/4.8.2/include/nmmintrin.h:31:3:
> error: #error "SSE4.2 instruction set not enabled"
> Â # error "SSE4.2 instruction set not enabled"
> Â Â Â ^
> test.cxx: In function 'int main(int, char**)':
> test.cxx:8:57: error: '_mm_extract_epi32' was not declared in this scope
> Â Â Â Â Â int x = _mm_extract_epi32(_mm_set_epi32(01,1,2,3), 0);
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ^
>
> According to Intel, they are SSE4.1 instructions.
> https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_extract
>
> Any ideas how this can be worked around without adding additional arch
> options? We don't want to add the arch option because it could result
> in a SIGILL if GCC selects instructions from the SSE4.2 ISA.
>
> Jeff
--
Xi Ruoyao <ryxi@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University
More information about the Gcc-help
mailing list