From: H.J. Lu Date: Thu, 27 May 2010 18:14:18 +0000 (-0700) Subject: Incorrect x86 CPU family and model check. X-Git-Tag: glibc-2.11.3~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21580967038a0150e330e56508ec4f04fdf0f490;p=thirdparty%2Fglibc.git Incorrect x86 CPU family and model check. (cherry picked from commit 3c88fe1e3ab8c6115e9b0c6eb109718da2116a33) --- diff --git a/ChangeLog b/ChangeLog index 871a70c5a30..b03035f17d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-05-26 H.J. Lu + + [BZ #11640] + * sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): + Properly check family and model. + 2010-05-26 Takashi Yoshii * sysdeps/unix/sysv/linux/sh/sh4/register-dump.h: Fix iov[] size. diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c index 0fe2f86b4f1..198fcaa8d34 100644 --- a/sysdeps/x86_64/multiarch/init-arch.c +++ b/sysdeps/x86_64/multiarch/init-arch.c @@ -62,12 +62,12 @@ __init_cpu_features (void) unsigned int eax = __cpu_features.cpuid[COMMON_CPUID_INDEX_1].eax; unsigned int extended_family = (eax >> 20) & 0xff; unsigned int extended_model = (eax >> 12) & 0xf0; - if (__cpu_features.family == 0x0f) + if (family == 0x0f) { family += extended_family; model += extended_model; } - else if (__cpu_features.family == 0x06) + else if (family == 0x06) model += extended_model; } /* This spells out "AuthenticAMD". */