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
On Sat, Feb 01, 2003 at 10:37:20PM +0100, Jakub Jelinek wrote:
> 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.
Note that that should be done in the kernel, not in ld.so.
Jakub