Hello Ian, Uroš, On 30 May 09:19, Uros Bizjak wrote: > Hello! > > > This error is because _mm_pause is defined in the scope of #pragma GCC > > target("sse"). But _mm_pause, which simply generates the pause > > instruction, does not require SSE support. The pause instruction has > > nothing really to do with SSE, and it works on all x86 processors (on > > processors that do not explicitly recognize it, it is a nop). > > > > I propose the following patch, which moves _mm_pause out of the pragma > > target scope. > > > > I know that x86intrin.h provides a similar intrinsic, __pause, but I > > think it's worth making _mm_pause work reasonably as well. > > > > I'm running a full testsuite run. OK for mainline if it passes? > > > > gcc/ChangeLog: > > > > 2014-05-29 Ian Lance Taylor <i...@google.com> > > > > * config/i386/xmmintrin.h (_mm_pause): Move out of scope of pragma > > target("sse"). > > > > gcc/testsuite/ChangeLog: > > > > 2014-05-29 Ian Lance Taylor <i...@google.com> > > > > * gcc.target/i386/pause-2.c: New test. > > The patch looks OK to me, but please wait a day or two for possible > comments (compatibility, etc) from Kirill. That is definetely a bug and I see no compatibility issues in the fix.
The only nit I see: maybe it'd be better to put this cpuid-less intrinsic into immintin.h? xmmintrin.h serves for SSE. -- Thanks, K