public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Roland McGrath <roland@hack.frob.com>,
	 Florian Weimer <fweimer@redhat.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: Fri, 11 Mar 2016 23:06:00 -0000	[thread overview]
Message-ID: <87y49o4ntk.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <CAMe9rOoNryvq8nZ7E_00n7C19u9rX=xD9EBetwMm+3KoPNw0fQ@mail.gmail.com> (H. J. Lu's message of "Fri, 11 Mar 2016 15:00:31 -0800")

* H. J. Lu:

> On Fri, Mar 11, 2016 at 2:55 PM, Roland McGrath <roland@hack.frob.com> wrote:
>>> Roland committed a fix which included <cpu-features.h> (commit
>>> 3bd80c0de2f8e7ca8020d37739339636d169957e) in tst-audit10.c I assumed
>>> that this addressed this particular build failure (it does for me with
>>> GCC 4.7).
>
> <cpu-features.h> shouldn't be used in test.

Why?

> #ifndef bit_AVX512F
> # define bit_AVX512F
> #endif

This would seem more reasonable:

diff --git a/sysdeps/x86_64/tst-audit10.c b/sysdeps/x86_64/tst-audit10.c
index a487b40..0df2275 100644
--- 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

  reply	other threads:[~2016-03-11 23:06 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 [this message]
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

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=87y49o4ntk.fsf@mid.deneb.enyo.de \
    --to=fw@deneb.enyo.de \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=roland@hack.frob.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).