This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Use __get_cpu_features () in HAS_CPUID_FLAG


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]