[PATCH] Detect and select i586/i686 implementation at run-time

H.J. Lu hjl.tools@gmail.com
Thu Aug 27 15:55:00 GMT 2015


On Thu, Aug 27, 2015 at 5:35 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Aug 27, 2015 at 5:10 AM, Ondřej Bílka <neleai@seznam.cz> wrote:
>> On Wed, Aug 26, 2015 at 08:57:05AM -0700, 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.  HAS_I586/HAS_I686 is true if i586/i686
>>> instructions are available on the processor.
>>>
>>> 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 or i386 code if it isn't an i586.  USE_I586/USE_I686 is true
>>> if i586/i686 implementation should be used for the processor.  USE_I586
>>> is true only if i686 instructions aren't available.  If i686 instructions
>>> are available, we always choose i686, i486 or i386 implementation, in
>>> that order, and we never choose i586 implementation for i686-class
>>> processors.
>>>
>> Here I couldn't test if its improvement so I won't help with that.
>>
>> However as it covers historic extensions a better alternative would be
>> use corresponding mmx to sse2 variant. Question here is again how much
>> we support these.
>
> The i486, i586, i686 version of multi-arch functions won't be used
> on processors with SSE.  The preferred version will be used on
> older processors.  It is an improvement for processors with SSE
> as well as older processors.
>

This is the patch I am checking in.

Thanks.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Detect-and-select-i586-i686-implementation-at-run-ti.patch
Type: text/x-patch
Size: 9843 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150827/a89b711d/attachment.bin>


More information about the Libc-alpha mailing list