+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
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
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
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
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
#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)
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
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
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
-#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
#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 */
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
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
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
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