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: V2 [PATCH] x86: Use _rdtsc intrinsic for HP_TIMING_NOW


On Tue, 2 Oct 2018, Adhemerval Zanella wrote:

> > NB: Checking if __i686__ isn't sufficient since __i686__ may not be
> > defined when building for i686 class processors.
> 
> Right, it seems gcc does not define it for -march newer than pentium4.

Specifically, you need a negative test (testing not building for an older 
processor) as in sysdeps/x86/cpu-features.h.  (There's probably a case for 
factoring it out so there's a single header, usable from assembly sources 
as well as from C code, that defines a macro, suitable for #if tests, that 
can be used to test "known to be i686 or later".)

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