Re: -msse4.1 causes "SSE4.2 instruction set not enabled"

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

 



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@xxxxxxxxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University



[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