Re: question about "x86 Built-in Functions" to detect cpu type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 8 Jul 2018 at 18:09, Dennis Clarke wrote:
>
>
> >> Tried that once before calling "__builtin_cpu_is" and also tried it
> >>    every time and it makes no difference.
> >
> > GCC actually "think" Pentium G and Core i3/i5 are Core i7 because they support
> > instructions of Core i7.
> >
>
> Perhaps dragging around inside the Linux kernel sources may find a
>   better method given that /proc/cpuinfo seems correct.

The built-in lets you query the CPU feature set so you can tell GCC to
generate code for that CPU family. It's not supposed to be a general
purpose CPU identification tool, it's just for use with GCC. If GCC
doesn't distinguish between different models of skylake chip and
supports the same set of target options and optimizations for all of
them, then it makes sense to identify them all as the same thing.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux