+2016-09-29 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/77756
+ * config/i386/cpuid.h (__get_cpuid_count): New.
+ (__get_cpuid): Rename __level to __leaf.
+
2016-09-29 Marek Polacek <polacek@redhat.com>
* genattrtab.c (write_attr_case): Also emit FALLTHRU marker.
get_destination_size, pass_sprintf_length::handle_gimple_call):
Likewise.
-2016-09-28 Uros Bizjak <ubizjak@gmail.com>
-
- PR target/77756
- * config/i386/cpuid.h (__get_cpuid): Handle CPUID level >= 7.
-
2016-09-28 Jakub Jelinek <jakub@redhat.com>
* gimple-ssa-sprintf.c: Fix comment formatting.
return __eax;
}
-/* Return cpuid data for requested cpuid level, as found in returned
+/* Return cpuid data for requested cpuid leaf, as found in returned
eax, ebx, ecx and edx registers. The function checks if cpuid is
supported and returns 1 for valid cpuid information or 0 for
- unsupported cpuid level. All pointers are required to be non-null. */
+ unsupported cpuid leaf. All pointers are required to be non-null. */
static __inline int
-__get_cpuid (unsigned int __level,
+__get_cpuid (unsigned int __leaf,
unsigned int *__eax, unsigned int *__ebx,
unsigned int *__ecx, unsigned int *__edx)
{
- unsigned int __ext = __level & 0x80000000;
+ unsigned int __ext = __leaf & 0x80000000;
- if (__get_cpuid_max (__ext, 0) < __level)
+ if (__get_cpuid_max (__ext, 0) < __leaf)
return 0;
- if (__ext)
- __cpuid (__level, *__eax, *__ebx, *__ecx, *__edx);
- else
- {
- if (__level >= 13)
- __cpuid_count (__level, 1, *__eax, *__ebx, *__ecx, *__edx);
- else if (__level >= 7)
- __cpuid_count (__level, 0, *__eax, *__ebx, *__ecx, *__edx);
- else
- __cpuid (__level, *__eax, *__ebx, *__ecx, *__edx);
- }
+ __cpuid (__leaf, *__eax, *__ebx, *__ecx, *__edx);
+ return 1;
+}
+
+/* Same as above, but sub-leaf can be specified. */
+
+static __inline int
+__get_cpuid_count (unsigned int __leaf, unsigned int __subleaf,
+ unsigned int *__eax, unsigned int *__ebx,
+ unsigned int *__ecx, unsigned int *__edx)
+{
+ unsigned int __ext = __leaf & 0x80000000;
+
+ if (__get_cpuid_max (__ext, 0) < __leaf)
+ return 0;
+
+ __cpuid_count (__leaf, __subleaf, *__eax, *__ebx, *__ecx, *__edx);
return 1;
}
+2016-09-29 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/77756
+ * gcc.target/i386/pr77756.c: New test.
+
2016-09-29 Marek Polacek <polacek@redhat.com>
* g++.dg/cpp0x/fallthrough2.C: Use the c++14_down target.
* gcc.dg/profile-update-warning.c: Restrict to ia32.
(dg-options): Remove -m32.
-2016-09-28 Uros Bizjak <ubizjak@gmail.com>
-
- PR target/77756
- * gcc.target/i386/pr77756.c: New test.
-
2016-09-28 Martin Sebor <msebor@redhat.com>
PR middle-end/77721