From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40644 invoked by alias); 10 Mar 2016 13:25:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 40459 invoked by uid 89); 10 Mar 2016 13:25:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1753 X-HELO: mail-qg0-f42.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=T5xU7PNA2tN9oaR1FSj4HwpXb54KtKSs7njEgr8cosE=; b=fvf7yEk/LJrYK+WOneDgaqYlHAei265eQXVvufxJkVNYYJ6KPwZ8X+GxPPExCf2+n3 81RspsKnxfjsDUcUH7KhfJ9vObV4EZSi7hj3uKBGZl2uDZOd04ld5NvYvZGRKNAjkCHC a+Ui+3TRStwdbnfBwduOaM2wpEkzTxQ3SRd5vF/hrjIyqxhC77Pkc3HJFkKwVOEQZLjG 62XrOjJjBrSZmj7OXTY1tRgAC9nNumHL8PMrxJY9qB402DUMMSpcZHqgIGPtwdiee3cJ ID9LYaJbEFxGYD4+fXtQK27QXeQGbCem1iX0pTo64GyoOJUaf43Q4kiXa5IBNxET4fBt 4erg== X-Gm-Message-State: AD7BkJJqfOF/zqDMUAZ52o4OKCe8J77dqF5/cCJiLzvfPQWzp3PFGUFFMuL1a1t6cBM3qE9esaULm+NTct0HlA== MIME-Version: 1.0 X-Received: by 10.140.169.9 with SMTP id p9mr4236501qhp.50.1457616302581; Thu, 10 Mar 2016 05:25:02 -0800 (PST) In-Reply-To: References: <1457049161-13783-1-git-send-email-hjl.tools@gmail.com> Date: Thu, 10 Mar 2016 13:25:00 -0000 Message-ID: Subject: Re: [PATCH 1/2] Add _arch_/_cpu_ to index_*/bit_* in x86 cpu-features.h From: "H.J. Lu" To: GNU C Library Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2016-03/txt/msg00302.txt.bz2 On Sun, Mar 6, 2016 at 7:46 AM, H.J. Lu wrote: > On Thu, Mar 3, 2016 at 3:52 PM, H.J. Lu wrote: >> index_* and bit_* macros are used to access cpuid and feature arrays o >> struct cpu_features. It is very easy to use bits and indices of cpuid >> array on feature array, especially in assembly codes. For example, >> sysdeps/i386/i686/multiarch/bcopy.S has >> >> HAS_CPU_FEATURE (Fast_Rep_String) >> >> which should be >> >> HAS_ARCH_FEATURE (Fast_Rep_String) >> >> We change index_* and bit_* to index_cpu_*/index_arch_* and >> bit_cpu_*/bit_arch_* so that we can catch such error at build time. >> >> [BZ #19762] >> * sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h >> (EXTRA_LD_ENVVARS): Add _arch_ to index_*/bit_*. >> * sysdeps/x86/cpu-features.c (init_cpu_features): Likewise. >> * sysdeps/x86/cpu-features.h (bit_*): Renamed to ... >> (bit_arch_*): This for feature array. >> (bit_*): Renamed to ... >> (bit_cpu_*): This for cpu array. >> (index_*): Renamed to ... >> (index_arch_*): This for feature array. >> (index_*): Renamed to ... >> (index_cpu_*): This for cpu array. >> [__ASSEMBLER__] (HAS_FEATURE): Add and use field. >> [__ASSEMBLER__] (HAS_CPU_FEATURE)): Pass cpu to HAS_FEATURE. >> [__ASSEMBLER__] (HAS_ARCH_FEATURE)): Pass arch to HAS_FEATURE. >> [!__ASSEMBLER__] (HAS_CPU_FEATURE): Replace index_##name and >> bit_##name with index_cpu_##name and bit_cpu_##name. >> [!__ASSEMBLER__] (HAS_ARCH_FEATURE): Replace index_##name and >> bit_##name with index_arch_##name and bit_arch_##name. > > Any comments? This change is almost mechanical. But it is > very useful to avoid typos. > I am checking it in now. -- H.J.