[PATCH] Define HAS_CPUID/HAS_I586/HAS_I686 from -march=
H.J. Lu
hjl.tools@gmail.com
Tue Aug 18 17:30:00 GMT 2015
On Tue, Aug 18, 2015 at 9:16 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> On Tue, 18 Aug 2015, H.J. Lu wrote:
>
>> My change is based on sysdeps/x86/bits/string.h and
>> sysdeps/x86/bits/byteswap.h. None of them check
>> __i586__ nor __i686__.
>
> Maybe
>
> (a) there should be a new (installed) bits/ header for x86, say
> bits/x86-arch.h, that defines __x86_arch to 4, 5 or 6 depending on such
> macros, so the logic doesn't need duplicating;
>
We can add cpu-features.h to installed header to provide both
run-time and compile-time CPU feature detection.
--
H.J.
More information about the Libc-alpha
mailing list