This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Detect i586 and i686 features at run-time
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 19 Aug 2015 04:19:19 -0700
- Subject: Re: [PATCH] Detect i586 and i686 features at run-time
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOqG_SVzgUrO2DjkRZWKJfFFGE6rYqCsmUxb3dPPti=8uw at mail dot gmail dot com> <20150819042011 dot GW1584 at vapier>
On Tue, Aug 18, 2015 at 9:20 PM, Mike Frysinger <firstname.lastname@example.org> wrote:
> On 18 Aug 2015 11:25, H.J. Lu wrote:
>> We detect i586 and i686 features at run-time by checking CX8 and CMOV
>> CPUID features bits. We can use these information to select the best
>> implementation in ix86 multiarch.
> there are i686's w/out cmov. shouldn't multiarch implementations that use
> certain insns be tied to those rather than a big knob like "i686" ?
For purpose glibc build, i686 has cmov:
[hjl@gnu-tools-1 glibc]$ grep cmov sysdeps/i386/i686/*.S
sysdeps/i386/i686/strcmp.S: cmovbl %ecx, %eax
sysdeps/i386/i686/strtok.S: cmove %eax, %edx
sysdeps/i386/i686/strtok.S: cmovne %ecx, %edx