summaryrefslogtreecommitdiff
path: root/sysdeps/x86/init-arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86/init-arch.h')
-rw-r--r--sysdeps/x86/init-arch.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sysdeps/x86/init-arch.h b/sysdeps/x86/init-arch.h
index 2b9988ebc3..55897fabf2 100644
--- a/sysdeps/x86/init-arch.h
+++ b/sysdeps/x86/init-arch.h
@@ -20,3 +20,16 @@
#else
# include <ldsodefs.h>
#endif
+
+#ifndef __x86_64__
+/* Due to the reordering and the other nifty extensions in i686, it is
+ not really good to use heavily i586 optimized code on an i686. It's
+ better to use i486 code if it isn't an i586. */
+# if MINIMUM_ISA == 686
+# define USE_I586 0
+# define USE_I686 1
+# else
+# define USE_I586 (HAS_ARCH_FEATURE (I586) && !HAS_ARCH_FEATURE (I686))
+# define USE_I686 HAS_ARCH_FEATURE (I686)
+# endif
+#endif