From: "H.J. Lu" <hjl.tools@gmail.com>
To: Uros Bizjak <ubizjak@gmail.com>, Richard Biener <rguenther@suse.de>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] i386: Move Intel intrinsics head files to <immintrin.h>
Date: Sun, 20 Jan 2019 15:11:00 -0000 [thread overview]
Message-ID: <CAMe9rOoeLi4yneMounb4zp1xjNMMMMtweP4VSKe7vn7pjKKf=A@mail.gmail.com> (raw)
In-Reply-To: <CAFULd4ZX9wZnY_g+xUuPtY3bG7AsksGt5zuCd+b+BaepALtqtw@mail.gmail.com>
On Sun, Jan 20, 2019 at 4:03 AM Uros Bizjak <ubizjak@gmail.com> wrote:
>
> On 1/19/19, H.J. Lu <hjl.tools@gmail.com> wrote:
> > 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>.
>
> I can't find the quoted requirement in the provided link.
That is an interactive website. If you type in "_xgetbv" and click on it,
you will get
Synopsis
unsigned __int64 _xgetbv (unsigned int a)
#include <immintrin.h>
Instruction: xgetbv
CPUID Flags: XSAVE
Description
Copy up to 64-bits from the value of the extended control register
(XCR) specified by a into dst. Currently only XFEATURE_ENABLED_MASK
XCR is supported.
Operation
dst[63:0] := XCR[a]
> > OK for trunk?
>
> You will need a RM approval for a non-regression fix patch at this point.
Richard, is this OK for GCC 9?
> Uros.
>
> > H.J.
> > ---
> > 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.
> > ---
> > gcc/config/i386/adxintrin.h | 4 ++--
> > gcc/config/i386/clflushoptintrin.h | 4 ++--
> > gcc/config/i386/clwbintrin.h | 4 ++--
> > gcc/config/i386/fxsrintrin.h | 6 +++---
> > gcc/config/i386/immintrin.h | 24 ++++++++++++++++++++++++
> > gcc/config/i386/pkuintrin.h | 4 ++--
> > gcc/config/i386/prfchwintrin.h | 4 ++--
> > gcc/config/i386/rdseedintrin.h | 4 ++--
> > gcc/config/i386/wbnoinvdintrin.h | 4 ++--
> > gcc/config/i386/x86intrin.h | 28 ----------------------------
> > gcc/config/i386/xsavecintrin.h | 4 ++--
> > gcc/config/i386/xsaveintrin.h | 6 +++---
> > gcc/config/i386/xsaveoptintrin.h | 6 +++---
> > gcc/config/i386/xsavesintrin.h | 4 ++--
> > 14 files changed, 51 insertions(+), 55 deletions(-)
> >
> > diff --git a/gcc/config/i386/adxintrin.h b/gcc/config/i386/adxintrin.h
> > index e01b77ddb4b..e8cb004390c 100644
> > --- a/gcc/config/i386/adxintrin.h
> > +++ b/gcc/config/i386/adxintrin.h
> > @@ -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
> > diff --git a/gcc/config/i386/clflushoptintrin.h
> > b/gcc/config/i386/clflushoptintrin.h
> > index 1e720c2515c..89aa0f68fc2 100644
> > --- a/gcc/config/i386/clflushoptintrin.h
> > +++ b/gcc/config/i386/clflushoptintrin.h
> > @@ -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
> > diff --git a/gcc/config/i386/clwbintrin.h b/gcc/config/i386/clwbintrin.h
> > index 217fb3babf2..68b20ea1635 100644
> > --- a/gcc/config/i386/clwbintrin.h
> > +++ b/gcc/config/i386/clwbintrin.h
> > @@ -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
> > diff --git a/gcc/config/i386/fxsrintrin.h b/gcc/config/i386/fxsrintrin.h
> > index ff6c6f848eb..c4b12cf25f3 100644
> > --- a/gcc/config/i386/fxsrintrin.h
> > +++ b/gcc/config/i386/fxsrintrin.h
> > @@ -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
> > diff --git a/gcc/config/i386/immintrin.h b/gcc/config/i386/immintrin.h
> > index 6ce00012b42..10e1f27c605 100644
> > --- a/gcc/config/i386/immintrin.h
> > +++ b/gcc/config/i386/immintrin.h
> > @@ -38,6 +38,16 @@
> >
> > #include <wmmintrin.h>
> >
> > +#include <fxsrintrin.h>
> > +
> > +#include <xsaveintrin.h>
> > +
> > +#include <xsaveoptintrin.h>
> > +
> > +#include <xsavesintrin.h>
> > +
> > +#include <xsavecintrin.h>
> > +
> > #include <avxintrin.h>
> >
> > #include <avx2intrin.h>
> > @@ -120,6 +130,20 @@
> >
> > #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)
> > diff --git a/gcc/config/i386/pkuintrin.h b/gcc/config/i386/pkuintrin.h
> > index 727bec5dda8..be46522f0c0 100644
> > --- a/gcc/config/i386/pkuintrin.h
> > +++ b/gcc/config/i386/pkuintrin.h
> > @@ -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
> > diff --git a/gcc/config/i386/prfchwintrin.h
> > b/gcc/config/i386/prfchwintrin.h
> > index dab46395cd4..3ecf9088ee6 100644
> > --- a/gcc/config/i386/prfchwintrin.h
> > +++ b/gcc/config/i386/prfchwintrin.h
> > @@ -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
> > diff --git a/gcc/config/i386/rdseedintrin.h
> > b/gcc/config/i386/rdseedintrin.h
> > index 56c7ec85535..73c07637970 100644
> > --- a/gcc/config/i386/rdseedintrin.h
> > +++ b/gcc/config/i386/rdseedintrin.h
> > @@ -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
> > diff --git a/gcc/config/i386/wbnoinvdintrin.h
> > b/gcc/config/i386/wbnoinvdintrin.h
> > index 9312a0082c9..5393698c6bb 100644
> > --- a/gcc/config/i386/wbnoinvdintrin.h
> > +++ b/gcc/config/i386/wbnoinvdintrin.h
> > @@ -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
> > diff --git a/gcc/config/i386/x86intrin.h b/gcc/config/i386/x86intrin.h
> > index 0eb8d88aeb8..6a08806ed7c 100644
> > --- a/gcc/config/i386/x86intrin.h
> > +++ b/gcc/config/i386/x86intrin.h
> > @@ -43,38 +43,10 @@
> >
> > #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 */
> > diff --git a/gcc/config/i386/xsavecintrin.h
> > b/gcc/config/i386/xsavecintrin.h
> > index c61f2d69b2a..d7aa43534e5 100644
> > --- a/gcc/config/i386/xsavecintrin.h
> > +++ b/gcc/config/i386/xsavecintrin.h
> > @@ -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
> > diff --git a/gcc/config/i386/xsaveintrin.h b/gcc/config/i386/xsaveintrin.h
> > index 3ab1c108c8c..77f9667b63b 100644
> > --- a/gcc/config/i386/xsaveintrin.h
> > +++ b/gcc/config/i386/xsaveintrin.h
> > @@ -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
> > diff --git a/gcc/config/i386/xsaveoptintrin.h
> > b/gcc/config/i386/xsaveoptintrin.h
> > index ae62107b647..2a0bf0b334e 100644
> > --- a/gcc/config/i386/xsaveoptintrin.h
> > +++ b/gcc/config/i386/xsaveoptintrin.h
> > @@ -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
> > diff --git a/gcc/config/i386/xsavesintrin.h
> > b/gcc/config/i386/xsavesintrin.h
> > index 1abc0b331c5..9d9d035a111 100644
> > --- a/gcc/config/i386/xsavesintrin.h
> > +++ b/gcc/config/i386/xsavesintrin.h
> > @@ -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
> > --
> > 2.20.1
> >
> >
--
H.J.
next prev parent reply other threads:[~2019-01-20 15:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-19 16:02 H.J. Lu
2019-01-20 12:03 ` Uros Bizjak
2019-01-20 15:11 ` H.J. Lu [this message]
2019-01-20 18:09 ` Uros Bizjak
2019-01-20 18:12 ` Uros Bizjak
2019-01-20 18:18 ` H.J. Lu
2019-01-21 8:04 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMe9rOoeLi4yneMounb4zp1xjNMMMMtweP4VSKe7vn7pjKKf=A@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
--cc=ubizjak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).