This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Use __get_cpu_features () in HAS_CPUID_FLAG
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Richard Henderson <rth at twiddle dot net>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 13 Dec 2012 20:29:25 -0800
- Subject: Re: PATCH: Use __get_cpu_features () in HAS_CPUID_FLAG
- References: <20121212225922.GA26326@intel.com><50CA0565.5030508@twiddle.net>
On Thu, Dec 13, 2012 at 8:42 AM, Richard Henderson <rth@twiddle.net> wrote:
> On 12/12/2012 02:59 PM, H.J. Lu wrote:
>> are called only within __init_cpu_features, where we can't
>> call __get_cpu_features without infinite recursion. */
>> # define HAS_CPUID_FLAG(idx, reg, bit) \
>> - (((&__cpu_features)->cpuid[idx].reg & (bit)) != 0)
>> + ((__get_cpu_features ()->cpuid[idx].reg & (bit)) != 0)
>
> Read the comment above, the important bit of which can even be read
> within this context.
>
You are right. Please ignore my patches. I am working on
http://sourceware.org/bugzilla/show_bug.cgi?id=14955
I will submit a different patch.
--
H.J.