diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2009-07-31 11:53:35 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-07-31 11:53:35 -0700 |
commit | 6f6f1215f68e5ae15ad18373234815fe7b2acc9e (patch) | |
tree | c6ca7c84df2663d2af45a5ebb47e1cb7d181e31d /sysdeps/x86_64/multiarch/init-arch.h | |
parent | 1877ea16ca0714abd715d6ce0aa1b840c3850241 (diff) | |
download | glibc-6f6f1215f68e5ae15ad18373234815fe7b2acc9e.tar.gz |
Support multiarch for i686.
This patch adds multiarch support when configured for i686. I modified
some x86-64 functions to support 32bit. I will contribute 32bit SSE string
and memory functions later.
Diffstat (limited to 'sysdeps/x86_64/multiarch/init-arch.h')
-rw-r--r-- | sysdeps/x86_64/multiarch/init-arch.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h index 0151e8b95b..8d9b1e8d8c 100644 --- a/sysdeps/x86_64/multiarch/init-arch.h +++ b/sysdeps/x86_64/multiarch/init-arch.h @@ -61,6 +61,9 @@ extern const struct cpu_features *__get_cpu_features (void) /* Following are the feature tests used throughout libc. */ #ifndef NOT_IN_libc +# define HAS_SSE2 \ + ((__cpu_features.cpuid[COMMON_CPUID_INDEX_1].edx & (1 << 26)) != 0) + # define HAS_POPCOUNT \ ((__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & (1 << 23)) != 0) @@ -70,6 +73,9 @@ extern const struct cpu_features *__get_cpu_features (void) # define HAS_FMA \ ((__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & (1 << 12)) != 0) #else +# define HAS_SSE2 \ + ((__get_cpu_features ()->cpuid[COMMON_CPUID_INDEX_1].edx & (1 << 26)) != 0) + # define HAS_POPCOUNT \ ((__get_cpu_features ()->cpuid[COMMON_CPUID_INDEX_1].ecx & (1 << 23)) != 0) |