This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch RFA: Move x86 _mm_pause out of pragma target("sse") scope
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Ian Lance Taylor <iant at google dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Date: Fri, 30 May 2014 09:19:44 +0200
- Subject: Re: Patch RFA: Move x86 _mm_pause out of pragma target("sse") scope
- Authentication-results: sourceware.org; auth=none
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.