diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-07-23 13:15:17 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-07-23 13:15:17 -0700 |
commit | d28797e426aa7e4e380a7ae10faf4aa3c4767e0b (patch) | |
tree | f3219b54a090a6252edd85cd30af80ba81ae556a /sysdeps/x86_64/multiarch/init-arch.c | |
parent | 666a9871f7afc40aebcc28eab8890ab99ee01a47 (diff) | |
download | glibc-d28797e426aa7e4e380a7ae10faf4aa3c4767e0b.tar.gz glibc-d28797e426aa7e4e380a7ae10faf4aa3c4767e0b.tar.xz glibc-d28797e426aa7e4e380a7ae10faf4aa3c4767e0b.zip |
Perform test for Arom x86-64 in central place and handle it.
There will be more than one function which, in multiarch mode, wants to use SSSE3. We should not test in each of them for Atoms with slow SSSE3. Instead, disable the SSSE3 bit in the startup code for such machines.
Diffstat (limited to 'sysdeps/x86_64/multiarch/init-arch.c')
-rw-r--r-- | sysdeps/x86_64/multiarch/init-arch.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c index 29e687344d..35fd19af0e 100644 --- a/sysdeps/x86_64/multiarch/init-arch.c +++ b/sysdeps/x86_64/multiarch/init-arch.c @@ -68,7 +68,13 @@ __init_cpu_features (void) __cpu_features.model += extended_model; } else if (__cpu_features.family == 0x06) - __cpu_features.model += extended_model; + { + __cpu_features.model += extended_model; + + if (__cpu_features.model == 0x1c) + /* Avoid SSSE3 on Atom since it is slow. */ + __cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx &= ~(1 << 9); + } } /* This spells out "AuthenticAMD". */ else if (ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65) |