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/i386 | |
parent | 1877ea16ca0714abd715d6ce0aa1b840c3850241 (diff) | |
download | glibc-6f6f1215f68e5ae15ad18373234815fe7b2acc9e.zip glibc-6f6f1215f68e5ae15ad18373234815fe7b2acc9e.tar.gz glibc-6f6f1215f68e5ae15ad18373234815fe7b2acc9e.tar.bz2 |
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/i386')
-rw-r--r-- | sysdeps/i386/i686/Makefile | 4 | ||||
-rw-r--r-- | sysdeps/i386/i686/cacheinfo.c | 8 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/Makefile | 4 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/ifunc-defines.sym | 17 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/init-arch.c | 3 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/init-arch.h | 1 | ||||
-rw-r--r-- | sysdeps/i386/i686/multiarch/sched_cpucount.c | 1 |
7 files changed, 38 insertions, 0 deletions
diff --git a/sysdeps/i386/i686/Makefile b/sysdeps/i386/i686/Makefile index c7378ab..dbcf1c3 100644 --- a/sysdeps/i386/i686/Makefile +++ b/sysdeps/i386/i686/Makefile @@ -5,3 +5,7 @@ endif # So that we can test __m128's alignment stack-align-test-flags += -msse + +ifeq ($(subdir),string) +sysdep_routines += cacheinfo +endif diff --git a/sysdeps/i386/i686/cacheinfo.c b/sysdeps/i386/i686/cacheinfo.c new file mode 100644 index 0000000..82e4cd2 --- /dev/null +++ b/sysdeps/i386/i686/cacheinfo.c @@ -0,0 +1,8 @@ +#define __x86_64_data_cache_size_half __x86_data_cache_size_half +#define __x86_64_shared_cache_size __x86_shared_cache_size +#define __x86_64_shared_cache_size_half __x86_shared_cache_size_half + +#define DISABLE_PREFETCHW +#define DISABLE_PREFERRED_MEMORY_INSTRUCTION + +#include <sysdeps/x86_64/cacheinfo.c> diff --git a/sysdeps/i386/i686/multiarch/Makefile b/sysdeps/i386/i686/multiarch/Makefile new file mode 100644 index 0000000..33d98c3 --- /dev/null +++ b/sysdeps/i386/i686/multiarch/Makefile @@ -0,0 +1,4 @@ +ifeq ($(subdir),csu) +aux += init-arch +gen-as-const-headers += ifunc-defines.sym +endif diff --git a/sysdeps/i386/i686/multiarch/ifunc-defines.sym b/sysdeps/i386/i686/multiarch/ifunc-defines.sym new file mode 100644 index 0000000..e2021cd --- /dev/null +++ b/sysdeps/i386/i686/multiarch/ifunc-defines.sym @@ -0,0 +1,17 @@ +#include "init-arch.h" +#include <stddef.h> + +-- + +CPU_FEATURES_SIZE sizeof (struct cpu_features) +KIND_OFFSET offsetof (struct cpu_features, kind) +CPUID_OFFSET offsetof (struct cpu_features, cpuid) +CPUID_SIZE sizeof (struct cpuid_registers) +CPUID_EAX_OFFSET offsetof (struct cpuid_registers, eax) +CPUID_EBX_OFFSET offsetof (struct cpuid_registers, ebx) +CPUID_ECX_OFFSET offsetof (struct cpuid_registers, ecx) +CPUID_EDX_OFFSET offsetof (struct cpuid_registers, edx) +FAMILY_OFFSET offsetof (struct cpu_features, family) +MODEL_OFFSET offsetof (struct cpu_features, model) + +COMMON_CPUID_INDEX_1 diff --git a/sysdeps/i386/i686/multiarch/init-arch.c b/sysdeps/i386/i686/multiarch/init-arch.c new file mode 100644 index 0000000..b371bae --- /dev/null +++ b/sysdeps/i386/i686/multiarch/init-arch.c @@ -0,0 +1,3 @@ +#define ENABLE_SSSE3_ON_ATOM + +#include <sysdeps/x86_64/multiarch/init-arch.c> diff --git a/sysdeps/i386/i686/multiarch/init-arch.h b/sysdeps/i386/i686/multiarch/init-arch.h new file mode 100644 index 0000000..cd2d0be --- /dev/null +++ b/sysdeps/i386/i686/multiarch/init-arch.h @@ -0,0 +1 @@ +#include <sysdeps/x86_64/multiarch/init-arch.h> diff --git a/sysdeps/i386/i686/multiarch/sched_cpucount.c b/sysdeps/i386/i686/multiarch/sched_cpucount.c new file mode 100644 index 0000000..7db31b0 --- /dev/null +++ b/sysdeps/i386/i686/multiarch/sched_cpucount.c @@ -0,0 +1 @@ +#include <sysdeps/x86_64/multiarch/sched_cpucount.c> |