i386: Move Intel intrinsics head files to <immintrin.h>
authorH.J. Lu <hongjiu.lu@intel.com>
Mon, 21 Jan 2019 12:23:49 +0000 (12:23 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 21 Jan 2019 12:23:49 +0000 (04:23 -0800)
According to Intel Intrinsics Guide:

https://software.intel.com/sites/landingpage/IntrinsicsGuide/

Intel intrinsics should be available by including <immintrin.h>.  This
patch moves remaining Intel intrinsics head files from <x86intrin.h> to
<immintrin.h>.

PR target/71659
* config/i386/adxintrin.h: Just check _IMMINTRIN_H_INCLUDED.
* config/i386/clflushoptintrin.h: Check _IMMINTRIN_H_INCLUDED
instead of _X86INTRIN_H_INCLUDED.
* onfig/i386/clwbintrin.h: Likewise.
* config/i386/pkuintrin.h: Likewise.
* config/i386/prfchwintrin.h: Likewise.
* config/i386/rdseedintrin.h: Likewise.
* config/i386/wbnoinvdintrin.h: Likewise.
* config/i386/xsavecintrin.h: Likewise.
* config/i386/xsavesintrin.h: Likewise.
* config/i386/fxsrintrin.h: Enable _IMMINTRIN_H_INCLUDED check.
* config/i386/xsaveintrin.h: Likewise.
* config/i386/xsaveoptintrin.h: Likewise.
* config/i386/x86intrin.h: Move "#include" <rdseedintrin.h>,
<prfchwintrin.h>, <fxsrintrin.h>, <xsaveintrin.h>,
<xsaveoptintrin.h>, <adxintrin.h>, <clwbintrin.h>,
<clflushoptintrin.h>, <xsavesintrin.h>, <xsavecintrin.h>,
<wbnoinvdintrin.h> and <pkuintrin.h> to ...
* config/i386/immintrin.h: Here.

From-SVN: r268113

15 files changed:
gcc/ChangeLog
gcc/config/i386/adxintrin.h
gcc/config/i386/clflushoptintrin.h
gcc/config/i386/clwbintrin.h
gcc/config/i386/fxsrintrin.h
gcc/config/i386/immintrin.h
gcc/config/i386/pkuintrin.h
gcc/config/i386/prfchwintrin.h
gcc/config/i386/rdseedintrin.h
gcc/config/i386/wbnoinvdintrin.h
gcc/config/i386/x86intrin.h
gcc/config/i386/xsavecintrin.h
gcc/config/i386/xsaveintrin.h
gcc/config/i386/xsaveoptintrin.h
gcc/config/i386/xsavesintrin.h

index 6ce35e078b8ae0e9e5a52f9f9f1b29e600e301c9..6fbfef4854b3f0d694866542b26ab00d566b64bd 100644 (file)
@@ -1,3 +1,26 @@
+2019-01-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/71659
+       * config/i386/adxintrin.h: Just check _IMMINTRIN_H_INCLUDED.
+       * config/i386/clflushoptintrin.h: Check _IMMINTRIN_H_INCLUDED
+       instead of _X86INTRIN_H_INCLUDED.
+       * onfig/i386/clwbintrin.h: Likewise.
+       * config/i386/pkuintrin.h: Likewise.
+       * config/i386/prfchwintrin.h: Likewise.
+       * config/i386/rdseedintrin.h: Likewise.
+       * config/i386/wbnoinvdintrin.h: Likewise.
+       * config/i386/xsavecintrin.h: Likewise.
+       * config/i386/xsavesintrin.h: Likewise.
+       * config/i386/fxsrintrin.h: Enable _IMMINTRIN_H_INCLUDED check.
+       * config/i386/xsaveintrin.h: Likewise.
+       * config/i386/xsaveoptintrin.h: Likewise.
+       * config/i386/x86intrin.h: Move "#include" <rdseedintrin.h>,
+       <prfchwintrin.h>, <fxsrintrin.h>, <xsaveintrin.h>,
+       <xsaveoptintrin.h>, <adxintrin.h>, <clwbintrin.h>,
+       <clflushoptintrin.h>, <xsavesintrin.h>, <xsavecintrin.h>,
+       <wbnoinvdintrin.h> and <pkuintrin.h> to ...
+       * config/i386/immintrin.h: Here.
+
 2019-01-20  Martin Jambor  <mjambor@suse.cz>
 
        PR ipa/87615
index e01b77ddb4bf1893a35825ec08786d8347484595..e8cb004390c08343fc783ca718d3a28398626dae 100644 (file)
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED && !defined _IMMINTRIN_H_INCLUDED
-# error "Never use <adxintrin.h> directly; include <x86intrin.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <adxintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _ADXINTRIN_H_INCLUDED
index 1e720c2515c6c41f6fedd70d9109d4a061710e03..89aa0f68fc250002e3699043a51543efffdb5ac6 100644 (file)
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED
-# error "Never use <clflushoptintrin.h> directly; include <x86intrin.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <clflushoptintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _CLFLUSHOPTINTRIN_H_INCLUDED
index 217fb3babf24eed88220368b1ba30eb823a35ef1..68b20ea16355699b4a0da78c52d08e3d261d823b 100644 (file)
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED
-# error "Never use <clwbintrin.h> directly; include <x86intrin.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <clwbintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _CLWBINTRIN_H_INCLUDED
index ff6c6f848eb1c36f74dae39d1caa524b62d87037..c4b12cf25f32519d9f4bf37f1b0daeca238bfc40 100644 (file)
@@ -21,9 +21,9 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* #if !defined _X86INTRIN_H_INCLUDED && !defined _IMMINTRIN_H_INCLUDED */
-/* # error "Never use <fxsrintrin.h> directly; include <x86intrin.h> instead." */
-/* #endif */
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <fxsrintrin.h> directly; include <immintrin.h> instead."
+#endif
 
 #ifndef _FXSRINTRIN_H_INCLUDED
 #define _FXSRINTRIN_H_INCLUDED
index 6ce00012b4281174eb3d840c89167acc9edbe775..10e1f27c605e7de81474ba1275d1065ae4e92899 100644 (file)
 
 #include <wmmintrin.h>
 
+#include <fxsrintrin.h>
+
+#include <xsaveintrin.h>
+
+#include <xsaveoptintrin.h>
+
+#include <xsavesintrin.h>
+
+#include <xsavecintrin.h>
+
 #include <avxintrin.h>
 
 #include <avx2intrin.h>
 
 #include <cldemoteintrin.h>
 
+#include <rdseedintrin.h>
+
+#include <prfchwintrin.h>
+
+#include <adxintrin.h>
+
+#include <clwbintrin.h>
+
+#include <clflushoptintrin.h>
+
+#include <wbnoinvdintrin.h>
+
+#include <pkuintrin.h>
+
 extern __inline void
 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
 _wbinvd (void)
index 727bec5dda83c1006434dc4091a0e6550bc45841..be46522f0c0cc3f896a9d5ebb7dcac9057c0a1e4 100644 (file)
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED
-# error "Never use <pkuintrin.h> directly; include <x86intrin.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <pkuintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _PKUINTRIN_H_INCLUDED
index dab46395cd4520a29d6a627188decbc6fdd079fd..3ecf9088ee61f6b7456b36ee5f2046b042934ce2 100644 (file)
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED && !defined _MM3DNOW_H_INCLUDED
-# error "Never use <prfchwintrin.h> directly; include <x86intrin.h> or <mm3dnow.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED && !defined _MM3DNOW_H_INCLUDED
+# error "Never use <prfchwintrin.h> directly; include <immintrin.h> or <mm3dnow.h> instead."
 #endif
 
 #ifndef _PRFCHWINTRIN_H_INCLUDED
index 56c7ec85535825bc687449f17dbbdd1b5ab4c189..73c0763797011dee4aac9b50afa4362b2faa6eb9 100644 (file)
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED
-# error "Never use <rdseedintrin.h> directly; include <x86intrin.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <rdseedintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _RDSEEDINTRIN_H_INCLUDED
index 9312a0082c9ffa85bece37aa16582be24ea6ae42..5393698c6bb1a708856223b79e995ce61a388065 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _X86INTRIN_H_INCLUDED
-#error "Never use <wbnoinvdintrin.h> directly; include <x86intrin.h> instead."
+#ifndef _IMMINTRIN_H_INCLUDED
+#error "Never use <wbnoinvdintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _WBNOINVDINTRIN_H_INCLUDED
index 0eb8d88aeb88904397b798fd24c857872c787702..6a08806ed7ce34e9619c79f95559539ad61a68c0 100644 (file)
 
 #include <popcntintrin.h>
 
-#include <rdseedintrin.h>
-
-#include <prfchwintrin.h>
-
-#include <fxsrintrin.h>
-
-#include <xsaveintrin.h>
-
-#include <xsaveoptintrin.h>
-
-#endif /* __iamcu__ */
-
-#include <adxintrin.h>
-
-#ifndef __iamcu__
-
-#include <clwbintrin.h>
-
-#include <clflushoptintrin.h>
-
-#include <xsavesintrin.h>
-
-#include <xsavecintrin.h>
-
 #include <mwaitxintrin.h>
 
 #include <clzerointrin.h>
 
-#include <wbnoinvdintrin.h>
-
-#include <pkuintrin.h>
-
 #endif /* __iamcu__ */
 
 #endif /* _X86INTRIN_H_INCLUDED */
index c61f2d69b2aab7d5c50115e518c687ed8ce918e8..d7aa43534e579fc0794c12b13a6da4fc75045605 100644 (file)
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED
-# error "Never use <xsavecintrin.h> directly; include <x86intrin.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <xsavecintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _XSAVECINTRIN_H_INCLUDED
index 3ab1c108c8cbe1166e3645ccfdf43920dc933858..77f9667b63bcc69f132cd0c72958ba0647f63c3f 100644 (file)
@@ -21,9 +21,9 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* #if !defined _X86INTRIN_H_INCLUDED && !defined _IMMINTRIN_H_INCLUDED */
-/* # error "Never use <xsaveintrin.h> directly; include <x86intrin.h> instead." */
-/* #endif */
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <xsaveintrin.h> directly; include <immintrin.h> instead."
+#endif
 
 #ifndef _XSAVEINTRIN_H_INCLUDED
 #define _XSAVEINTRIN_H_INCLUDED
index ae62107b647e3a6369cbdffd68256682e08451f5..2a0bf0b334eeb28d352e79fe4fd0ce3423c9e9e9 100644 (file)
@@ -21,9 +21,9 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* #if !defined _X86INTRIN_H_INCLUDED && !defined _IMMINTRIN_H_INCLUDED */
-/* # error "Never use <xsaveoptintrin.h> directly; include <x86intrin.h> instead." */
-/* #endif */
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <xsaveoptintrin.h> directly; include <immintrin.h> instead."
+#endif
 
 #ifndef _XSAVEOPTINTRIN_H_INCLUDED
 #define _XSAVEOPTINTRIN_H_INCLUDED
index 1abc0b331c5b87dd373d00963a7874cf99cd8c08..9d9d035a111eff7ff884971946586c666f7353c0 100644 (file)
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED
-# error "Never use <xsavesintrin.h> directly; include <x86intrin.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <xsavesintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _XSAVESINTRIN_H_INCLUDED