This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Use __get_cpu_features () in HAS_CPUID_FLAG
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 12 Dec 2012 14:59:22 -0800
- Subject: PATCH: Use __get_cpu_features () in HAS_CPUID_FLAG
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
We should use __get_cpu_features () instead of &__cpu_features in
HAS_CPUID_FLAG. OK for 2.18?
Thanks.
H.J.
---
2012-12-12 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/x86_64/multiarch/init-arch.h (HAS_CPUID_FLAG): Use
__get_cpu_features ().
diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h
index 5ae6e9a..e3a9e50 100644
--- a/sysdeps/x86_64/multiarch/init-arch.h
+++ b/sysdeps/x86_64/multiarch/init-arch.h
@@ -135,7 +135,7 @@ extern const struct cpu_features *__get_cpu_features (void)
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)
# define CPUID_OSXSAVE \
HAS_CPUID_FLAG (COMMON_CPUID_INDEX_1, ecx, bit_OSXSAVE)
--
1.7.11.7