From patchwork Fri Mar 11 23:06:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 11310 Received: (qmail 114854 invoked by alias); 11 Mar 2016 23:06:33 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 114845 invoked by uid 89); 11 Mar 2016 23:06:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=386, rolandhackfrobcom, roland@hack.frob.com, 389 X-HELO: albireo.enyo.de From: Florian Weimer To: "H.J. Lu" Cc: Roland McGrath , Florian Weimer , GNU C Library Subject: Re: [PATCH 1/2] Add _arch_/_cpu_ to index_*/bit_* in x86 cpu-features.h References: <1457049161-13783-1-git-send-email-hjl.tools@gmail.com> <20160311214735.4CAE52C3C21@topped-with-meat.com> <20160311220031.3A5672C3BC5@topped-with-meat.com> <20160311222939.654342C3C24@topped-with-meat.com> <874mcc636j.fsf@mid.deneb.enyo.de> <20160311225548.C6A7E2C3C24@topped-with-meat.com> Date: Sat, 12 Mar 2016 00:06:15 +0100 In-Reply-To: (H. J. Lu's message of "Fri, 11 Mar 2016 15:00:31 -0800") Message-ID: <87y49o4ntk.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 * H. J. Lu: > On Fri, Mar 11, 2016 at 2:55 PM, Roland McGrath wrote: >>> Roland committed a fix which included (commit >>> 3bd80c0de2f8e7ca8020d37739339636d169957e) in tst-audit10.c I assumed >>> that this addressed this particular build failure (it does for me with >>> GCC 4.7). > > 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 @@ . */ #include -#include 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