diff options
Diffstat (limited to 'sysdeps/x86_64/multiarch/init-arch.h')
-rw-r--r-- | sysdeps/x86_64/multiarch/init-arch.h | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h index 86cd83dc4c..40b804571d 100644 --- a/sysdeps/x86_64/multiarch/init-arch.h +++ b/sysdeps/x86_64/multiarch/init-arch.h @@ -1,5 +1,5 @@ /* This file is part of the GNU C Library. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -20,16 +20,9 @@ enum { - INTEL_CPUID_INDEX_1 = 0, + COMMON_CPUID_INDEX_1 = 0, /* Keep the following line at the end. */ - INTEL_CPUID_INDEX_MAX - }; - -enum - { - AMD_CPUID_INDEX_1 = 0, - /* Keep the following line at the end. */ - AMD_CPUID_INDEX_MAX + COMMON_CPUID_INDEX_MAX }; extern struct cpu_features @@ -48,7 +41,7 @@ extern struct cpu_features unsigned int ebx; unsigned int ecx; unsigned int edx; - } cpuid[MAX (INTEL_CPUID_INDEX_MAX, AMD_CPUID_INDEX_MAX)]; + } cpuid[COMMON_CPUID_INDEX_MAX]; } __cpu_features attribute_hidden; @@ -61,10 +54,5 @@ extern void __init_cpu_features (void) attribute_hidden; /* Following are the feature tests used throughout libc. */ -#define INTEL_HAS_POPCOUNT \ - (__cpu_features.kind == arch_kind_intel \ - && (__cpu_features.cpuid[INTEL_CPUID_INDEX_1].ecx & (1 << 23)) != 0) - -#define AMD_HAS_POPCOUNT \ - (__cpu_features.kind == arch_kind_amd \ - && (__cpu_features.cpuid[AMD_CPUID_INDEX_1].ecx & (1 << 23)) != 0) +#define HAS_POPCOUNT \ + ((__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & (1 << 23)) != 0) |