This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] Add cmov into i386 HWCAP_IMPORTANT
- From: GOTO Masanori <gotom at debian dot or dot jp>
- To: libc-alpha at sources dot redhat dot com
- Cc: gotom at debian dot or dot jp
- Date: Sun, 02 Feb 2003 06:29:45 +0900
- Subject: [PATCH] Add cmov into i386 HWCAP_IMPORTANT
Hi,
This patch adds HWCAP_I386_CMOV into i386 HWCAP_IMPORTANT.
CMOV is i686 optional instruction, and VIA C3 processor does not
support it, but VIA C3 reports it's an i686 class processor.
Unfortunately, gcc generates this optional CMOV instruction with
-mcpu=i686 optimization, so i686 optimized dynamic library code almost
causes "illegal instruction" error on VIA C3 processor during dynamic
loading. I heard that gcc team does not think to change using CMOV
instruction with i686 optimization. CMOV is very key instruction to
make faster.
But I think this patch is needed regardless of gcc generates cmov
instruction code with i686 optimization. Please apply it.
Regards,
-- gotom
2002-02-02 GOTO Masanori <gotom@debian.or.jp>
* sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Add HWCAP_I386_CMOV
into i386 HWCAP_IMPORTANT, because VIA C3 processor does not have
i686 optional instruction CMOV.
--- sysdeps/unix/sysv/linux/i386/dl-procinfo.h 2002-09-22 06:14:11.000000000 +0900
+++ sysdeps/unix/sysv/linux/i386/dl-procinfo.h.new 2003-01-19 01:18:55.000000000 +0900
@@ -92,7 +92,7 @@
HWCAP_I386_AMD3D = 1 << 31,
/* XXX Which others to add here? */
- HWCAP_IMPORTANT = (HWCAP_I386_MMX)
+ HWCAP_IMPORTANT = (HWCAP_I386_MMX | HWCAP_I386_CMOV)
};