diff options
Diffstat (limited to 'sysdeps/x86_64')
-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 55c9f54f96..786466d5fd 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 4a211c0864..783b02015e 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__ */ |