Commit 6c0d746f by H.J. Lu Committed by H.J. Lu

i386: Move Intel intrinsics head files to <immintrin.h>

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
parent 8f10fb50
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> 2019-01-20 Martin Jambor <mjambor@suse.cz>
PR ipa/87615 PR ipa/87615
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if !defined _X86INTRIN_H_INCLUDED && !defined _IMMINTRIN_H_INCLUDED #if !defined _IMMINTRIN_H_INCLUDED
# error "Never use <adxintrin.h> directly; include <x86intrin.h> instead." # error "Never use <adxintrin.h> directly; include <immintrin.h> instead."
#endif #endif
#ifndef _ADXINTRIN_H_INCLUDED #ifndef _ADXINTRIN_H_INCLUDED
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if !defined _X86INTRIN_H_INCLUDED #if !defined _IMMINTRIN_H_INCLUDED
# error "Never use <clflushoptintrin.h> directly; include <x86intrin.h> instead." # error "Never use <clflushoptintrin.h> directly; include <immintrin.h> instead."
#endif #endif
#ifndef _CLFLUSHOPTINTRIN_H_INCLUDED #ifndef _CLFLUSHOPTINTRIN_H_INCLUDED
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if !defined _X86INTRIN_H_INCLUDED #if !defined _IMMINTRIN_H_INCLUDED
# error "Never use <clwbintrin.h> directly; include <x86intrin.h> instead." # error "Never use <clwbintrin.h> directly; include <immintrin.h> instead."
#endif #endif
#ifndef _CLWBINTRIN_H_INCLUDED #ifndef _CLWBINTRIN_H_INCLUDED
......
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
/* #if !defined _X86INTRIN_H_INCLUDED && !defined _IMMINTRIN_H_INCLUDED */ #if !defined _IMMINTRIN_H_INCLUDED
/* # error "Never use <fxsrintrin.h> directly; include <x86intrin.h> instead." */ # error "Never use <fxsrintrin.h> directly; include <immintrin.h> instead."
/* #endif */ #endif
#ifndef _FXSRINTRIN_H_INCLUDED #ifndef _FXSRINTRIN_H_INCLUDED
#define _FXSRINTRIN_H_INCLUDED #define _FXSRINTRIN_H_INCLUDED
......
...@@ -38,6 +38,16 @@ ...@@ -38,6 +38,16 @@
#include <wmmintrin.h> #include <wmmintrin.h>
#include <fxsrintrin.h>
#include <xsaveintrin.h>
#include <xsaveoptintrin.h>
#include <xsavesintrin.h>
#include <xsavecintrin.h>
#include <avxintrin.h> #include <avxintrin.h>
#include <avx2intrin.h> #include <avx2intrin.h>
...@@ -120,6 +130,20 @@ ...@@ -120,6 +130,20 @@
#include <cldemoteintrin.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 extern __inline void
__attribute__((__gnu_inline__, __always_inline__, __artificial__)) __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_wbinvd (void) _wbinvd (void)
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if !defined _X86INTRIN_H_INCLUDED #if !defined _IMMINTRIN_H_INCLUDED
# error "Never use <pkuintrin.h> directly; include <x86intrin.h> instead." # error "Never use <pkuintrin.h> directly; include <immintrin.h> instead."
#endif #endif
#ifndef _PKUINTRIN_H_INCLUDED #ifndef _PKUINTRIN_H_INCLUDED
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if !defined _X86INTRIN_H_INCLUDED && !defined _MM3DNOW_H_INCLUDED #if !defined _IMMINTRIN_H_INCLUDED && !defined _MM3DNOW_H_INCLUDED
# error "Never use <prfchwintrin.h> directly; include <x86intrin.h> or <mm3dnow.h> instead." # error "Never use <prfchwintrin.h> directly; include <immintrin.h> or <mm3dnow.h> instead."
#endif #endif
#ifndef _PRFCHWINTRIN_H_INCLUDED #ifndef _PRFCHWINTRIN_H_INCLUDED
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if !defined _X86INTRIN_H_INCLUDED #if !defined _IMMINTRIN_H_INCLUDED
# error "Never use <rdseedintrin.h> directly; include <x86intrin.h> instead." # error "Never use <rdseedintrin.h> directly; include <immintrin.h> instead."
#endif #endif
#ifndef _RDSEEDINTRIN_H_INCLUDED #ifndef _RDSEEDINTRIN_H_INCLUDED
......
#ifndef _X86INTRIN_H_INCLUDED #ifndef _IMMINTRIN_H_INCLUDED
#error "Never use <wbnoinvdintrin.h> directly; include <x86intrin.h> instead." #error "Never use <wbnoinvdintrin.h> directly; include <immintrin.h> instead."
#endif #endif
#ifndef _WBNOINVDINTRIN_H_INCLUDED #ifndef _WBNOINVDINTRIN_H_INCLUDED
......
...@@ -43,38 +43,10 @@ ...@@ -43,38 +43,10 @@
#include <popcntintrin.h> #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 <mwaitxintrin.h>
#include <clzerointrin.h> #include <clzerointrin.h>
#include <wbnoinvdintrin.h>
#include <pkuintrin.h>
#endif /* __iamcu__ */ #endif /* __iamcu__ */
#endif /* _X86INTRIN_H_INCLUDED */ #endif /* _X86INTRIN_H_INCLUDED */
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if !defined _X86INTRIN_H_INCLUDED #if !defined _IMMINTRIN_H_INCLUDED
# error "Never use <xsavecintrin.h> directly; include <x86intrin.h> instead." # error "Never use <xsavecintrin.h> directly; include <immintrin.h> instead."
#endif #endif
#ifndef _XSAVECINTRIN_H_INCLUDED #ifndef _XSAVECINTRIN_H_INCLUDED
......
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
/* #if !defined _X86INTRIN_H_INCLUDED && !defined _IMMINTRIN_H_INCLUDED */ #if !defined _IMMINTRIN_H_INCLUDED
/* # error "Never use <xsaveintrin.h> directly; include <x86intrin.h> instead." */ # error "Never use <xsaveintrin.h> directly; include <immintrin.h> instead."
/* #endif */ #endif
#ifndef _XSAVEINTRIN_H_INCLUDED #ifndef _XSAVEINTRIN_H_INCLUDED
#define _XSAVEINTRIN_H_INCLUDED #define _XSAVEINTRIN_H_INCLUDED
......
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
/* #if !defined _X86INTRIN_H_INCLUDED && !defined _IMMINTRIN_H_INCLUDED */ #if !defined _IMMINTRIN_H_INCLUDED
/* # error "Never use <xsaveoptintrin.h> directly; include <x86intrin.h> instead." */ # error "Never use <xsaveoptintrin.h> directly; include <immintrin.h> instead."
/* #endif */ #endif
#ifndef _XSAVEOPTINTRIN_H_INCLUDED #ifndef _XSAVEOPTINTRIN_H_INCLUDED
#define _XSAVEOPTINTRIN_H_INCLUDED #define _XSAVEOPTINTRIN_H_INCLUDED
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if !defined _X86INTRIN_H_INCLUDED #if !defined _IMMINTRIN_H_INCLUDED
# error "Never use <xsavesintrin.h> directly; include <x86intrin.h> instead." # error "Never use <xsavesintrin.h> directly; include <immintrin.h> instead."
#endif #endif
#ifndef _XSAVESINTRIN_H_INCLUDED #ifndef _XSAVESINTRIN_H_INCLUDED
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment