This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] Add cmov into i386 HWCAP_IMPORTANT
- From: Jakub Jelinek <jakub at redhat dot com>
- To: GOTO Masanori <gotom at debian dot or dot jp>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Sat, 1 Feb 2003 22:37:20 +0100
- Subject: Re: [PATCH] Add cmov into i386 HWCAP_IMPORTANT
- References: <80bs1vd706.wl@oris.opensource.jp>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Feb 02, 2003 at 06:29:45AM +0900, GOTO Masanori wrote:
> 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.
Guess you're aware about how much this penalizes everybody using
DT_R{,UN}PATH and LD_LIBRARY_PATH...
IMHO way better is just change platform to i586 when cmov hwcap is not set.
> 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)
>
> };
>
Jakub