public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@hack.frob.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Florian Weimer <fw@deneb.enyo.de>,
	"H.J. Lu" <hjl.tools@gmail.com>,
	GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH 1/2] Add _arch_/_cpu_ to index_*/bit_* in x86 cpu-features.h
Date: Mon, 28 Mar 2016 22:16:00 -0000	[thread overview]
Message-ID: <20160328221553.583612C3CC6@topped-with-meat.com> (raw)
In-Reply-To: Florian Weimer's message of  Friday, 25 March 2016 11:40:10 +0100 <56F5158A.5040302@redhat.com>

> > --- a/sysdeps/x86_64/tst-audit10.c
> > +++ b/sysdeps/x86_64/tst-audit10.c
> > @@ -17,13 +17,13 @@
> >     <http://www.gnu.org/licenses/>.  */
> >  
> >  #include <cpuid.h>
> > -#include <cpu-features.h>
> >  
> >  int tst_audit10_aux (void);
> >  
> >  static int
> >  avx512_enabled (void)
> >  {
> > +#ifdef bit_AVX512F
> >    unsigned int eax, ebx, ecx, edx;
> >  
> >    if (__get_cpuid (1, &eax, &ebx, &ecx, &edx) == 0
> > @@ -38,6 +38,9 @@ avx512_enabled (void)
> >  
> >    /* Verify that ZMM, YMM and XMM states are enabled.  */
> >    return (eax & 0xe6) == 0xe6;
> > +#else
> > +  return 0;
> > +#endif
> >  }
> >  
> >  static int
> 
> I have committed this, after testing compilation with GCC 4.7 and GCC
> 5.3.  Bug 19860 mentions a second compilation error, which I did not
> see.  I'm waiting for details on that one, maybe it was a spurious issue.

It occurred to me later that having this use #ifdef HAVE_AVX512_SUPPORT
would be better.  That is, we expect a compiler that accepts -mavx512f
to provide a <cpuid.h> that defines bit_AVX512F.  If we have -mavx512f
support but somehow get a <cpuid.h> missing bit_AVX512F, that should be
a build error because the compiler installation is self-inconsistent.


Thanks,
Roland

      reply	other threads:[~2016-03-28 22:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03 23:52 H.J. Lu
2016-03-03 23:52 ` [PATCH 2/2] Use HAS_ARCH_FEATURE with Fast_Rep_String H.J. Lu
2016-03-06 15:48   ` H.J. Lu
2016-03-06 15:46 ` [PATCH 1/2] Add _arch_/_cpu_ to index_*/bit_* in x86 cpu-features.h H.J. Lu
2016-03-10 13:25   ` H.J. Lu
2016-03-11 21:47   ` Roland McGrath
2016-03-11 21:50     ` H.J. Lu
2016-03-11 22:00       ` Roland McGrath
2016-03-11 22:20         ` H.J. Lu
2016-03-11 22:29           ` Roland McGrath
2016-03-11 22:41             ` H.J. Lu
2016-03-11 22:49               ` Florian Weimer
2016-03-11 22:55                 ` Roland McGrath
2016-03-11 23:00                   ` H.J. Lu
2016-03-11 23:06                     ` Florian Weimer
2016-03-11 23:09                       ` H.J. Lu
2016-03-11 23:16                       ` Roland McGrath
2016-03-25 10:40                       ` Florian Weimer
2016-03-28 22:16                         ` Roland McGrath [this message]

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=20160328221553.583612C3CC6@topped-with-meat.com \
    --to=roland@hack.frob.com \
    --cc=fw@deneb.enyo.de \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /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).