diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2010-08-25 10:07:37 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-08-25 10:07:37 -0700 |
commit | e73015f2d666b66c69f3c6f350e2dcd3df5b075a (patch) | |
tree | 7de6944489f3b23150d179999437020fcd505afa /sysdeps/x86_64/multiarch | |
parent | 224c3568f622f367dbbcd3acbcb6cc673ef0a606 (diff) | |
download | glibc-e73015f2d666b66c69f3c6f350e2dcd3df5b075a.zip glibc-e73015f2d666b66c69f3c6f350e2dcd3df5b075a.tar.gz glibc-e73015f2d666b66c69f3c6f350e2dcd3df5b075a.tar.bz2 |
Unroll 32bit SSE strlen and handle slow bsf
Diffstat (limited to 'sysdeps/x86_64/multiarch')
-rw-r--r-- | sysdeps/x86_64/multiarch/init-arch.c | 6 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/init-arch.h | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c index 55c9f54..786466d 100644 --- a/sysdeps/x86_64/multiarch/init-arch.c +++ b/sysdeps/x86_64/multiarch/init-arch.c @@ -72,6 +72,12 @@ __init_cpu_features (void) model += extended_model; switch (model) { + case 0x1c: + case 0x26: + /* BSF is slow on Atom. */ + __cpu_features.feature[index_Slow_BSF] |= bit_Slow_BSF; + break; + case 0x1a: case 0x1e: case 0x1f: diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h index 4a211c0..783b020 100644 --- a/sysdeps/x86_64/multiarch/init-arch.h +++ b/sysdeps/x86_64/multiarch/init-arch.h @@ -18,6 +18,7 @@ #define bit_Fast_Rep_String (1 << 0) #define bit_Fast_Copy_Backward (1 << 1) +#define bit_Slow_BSF (1 << 2) #ifdef __ASSEMBLER__ @@ -35,6 +36,7 @@ # define index_Fast_Rep_String FEATURE_INDEX_1*FEATURE_SIZE # define index_Fast_Copy_Backward FEATURE_INDEX_1*FEATURE_SIZE +# define index_Slow_BSF FEATURE_INDEX_1*FEATURE_SIZE #else /* __ASSEMBLER__ */ @@ -106,6 +108,7 @@ extern const struct cpu_features *__get_cpu_features (void) # define index_Fast_Rep_String FEATURE_INDEX_1 # define index_Fast_Copy_Backward FEATURE_INDEX_1 +# define index_Slow_BSF FEATURE_INDEX_1 #define HAS_ARCH_FEATURE(idx, bit) \ ((__get_cpu_features ()->feature[idx] & (bit)) != 0) @@ -116,4 +119,7 @@ extern const struct cpu_features *__get_cpu_features (void) #define HAS_FAST_COPY_BACKWARD \ HAS_ARCH_FEATURE (index_Fast_Copy_Backward, bit_Fast_Copy_Backward) +#define HAS_SLOW_BSF \ + HAS_ARCH_FEATURE (index_Slow_BSF, bit_Slow_BSF) + #endif /* __ASSEMBLER__ */ |