This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]