This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch RFA: Move x86 _mm_pause out of pragma target("sse") scope


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  <iant@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  <iant@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.

Thanks,
Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]