This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/77756] __get_cpuid() returns wrong values for level 7 (extended features)
- From: "yzhang1985 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 30 Sep 2016 20:56:25 +0000
- Subject: [Bug target/77756] __get_cpuid() returns wrong values for level 7 (extended features)
- Auto-submitted: auto-generated
- References: <bug-77756-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77756
--- Comment #12 from Yale Zhang <yzhang1985 at gmail dot com> ---
What's the purpose of subleaf? Is it to distinguish the capabilities of
different cores in a heterogeneous chip (e.g. ARM big-little)?
Then I would be fine with making this an extra parameter to __get_cpuid().
Microsoft has a __cpuidex() function that also takes subleaf, but for the
regular __cpuid(), the subleaf default to 0. Should __get_cpuid() default to 0
as well?
(In reply to uros from comment #11)
> Author: uros
> Date: Thu Sep 29 18:44:32 2016
> New Revision: 240629
>
> URL: https://gcc.gnu.org/viewcvs?rev=240629&root=gcc&view=rev
> Log:
> PR target/77756
> * config/i386/cpuid.h (__get_cpuid_count): New.
> (__get_cpuid): Rename __level to __leaf.
>
> testsuite/ChangeLog:
>
> PR target/77756
> * gcc.target/i386/pr77756.c: New test.
>
>
> Modified:
> trunk/gcc/ChangeLog
> trunk/gcc/config/i386/cpuid.h
> trunk/gcc/testsuite/ChangeLog
> trunk/gcc/testsuite/gcc.target/i386/pr77756.c