From: "H.J. Lu" <hjl.tools@gmail.com>
To: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH 1/2] Add _arch_/_cpu_ to index_*/bit_* in x86 cpu-features.h
Date: Sun, 06 Mar 2016 15:46:00 -0000 [thread overview]
Message-ID: <CAMe9rOqmnA8TOOEo_KbxYnxaDDvzEcb+hqLHwK=dZ5J75W8d5Q@mail.gmail.com> (raw)
In-Reply-To: <1457049161-13783-1-git-send-email-hjl.tools@gmail.com>
On Thu, Mar 3, 2016 at 3:52 PM, H.J. Lu <hjl.tools@gmail.com> 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.
--
H.J.
next prev parent reply other threads:[~2016-03-06 15:46 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 ` H.J. Lu [this message]
2016-03-10 13:25 ` [PATCH 1/2] Add _arch_/_cpu_ to index_*/bit_* in x86 cpu-features.h 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
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='CAMe9rOqmnA8TOOEo_KbxYnxaDDvzEcb+hqLHwK=dZ5J75W8d5Q@mail.gmail.com' \
--to=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).