diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2010-01-12 11:22:03 -0800 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-01-12 11:22:03 -0800 |
commit | 3af48cbdfaeb8bc389de1caeb33bc29811da80e8 (patch) | |
tree | 94a209777ab8c7e24cff9e50660a4075e6338594 /sysdeps/x86_64/multiarch/init-arch.h | |
parent | 4bfc6ab9ae3b259caa8b12229f0c67b4b514e9cd (diff) | |
download | glibc-3af48cbdfaeb8bc389de1caeb33bc29811da80e8.tar.gz |
Optimize 32bit memset/memcpy with SSE2/SSSE3.
Diffstat (limited to 'sysdeps/x86_64/multiarch/init-arch.h')
-rw-r--r-- | sysdeps/x86_64/multiarch/init-arch.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h index 0f8f77a8a1..69492cb3bf 100644 --- a/sysdeps/x86_64/multiarch/init-arch.h +++ b/sysdeps/x86_64/multiarch/init-arch.h @@ -16,6 +16,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#define bit_Fast_Rep_String (1 << 0) + #ifdef __ASSEMBLER__ #include <ifunc-defines.h> @@ -28,6 +30,8 @@ #define index_SSSE3 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET #define index_SSE4_2 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET +#define index_Fast_Rep_String FEATURE_INDEX_1*FEATURE_SIZE + #else /* __ASSEMBLER__ */ #include <sys/param.h> @@ -39,6 +43,13 @@ enum COMMON_CPUID_INDEX_MAX }; +enum + { + FEATURE_INDEX_1 = 0, + /* Keep the following line at the end. */ + FEATURE_INDEX_MAX + }; + extern struct cpu_features { enum @@ -58,6 +69,7 @@ extern struct cpu_features } cpuid[COMMON_CPUID_INDEX_MAX]; unsigned int family; unsigned int model; + unsigned int feature[FEATURE_INDEX_MAX]; } __cpu_features attribute_hidden; @@ -86,4 +98,6 @@ extern const struct cpu_features *__get_cpu_features (void) #define HAS_SSE4_2 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 20) #define HAS_FMA HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 12) +#define index_Fast_Rep_String FEATURE_INDEX_1 + #endif /* __ASSEMBLER__ */ |