This is the mail archive of the libc-alpha@sourceware.org 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] Define HAS_CPUID/HAS_I586/HAS_I686 from -march=


On Tue, 18 Aug 2015, H.J. Lu wrote:

> 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.

What I'm suggesting requires a header that does not define or use any 
identifiers outside of the implementation namespace, so that it can be 
included by other installed headers.  This is substantially different from 
cpu-features.h.

-- 
Joseph S. Myers
joseph@codesourcery.com


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