Commit e0ab3753 by Uros Bizjak Committed by Uros Bizjak

cpuinfo.c (__get_cpuid_output): Remove.

	* config/i386/cpuinfo.c (__get_cpuid_output): Remove.
	(__cpu_indicator_init): Call __get_cpuid, not __get_cpuid_output.

From-SVN: r240590
parent b236debd
2015-09-28 Uros Bizjak <ubizjak@gmail.com>
* config/i386/cpuinfo.c (__get_cpuid_output): Remove.
(__cpu_indicator_init): Call __get_cpuid, not __get_cpuid_output.
2016-09-27 Martin Liska <mliska@suse.cz> 2016-09-27 Martin Liska <mliska@suse.cz>
PR gcov-profile/7970 PR gcov-profile/7970
......
...@@ -381,20 +381,6 @@ get_available_features (unsigned int ecx, unsigned int edx, ...@@ -381,20 +381,6 @@ get_available_features (unsigned int ecx, unsigned int edx,
__cpu_model.__cpu_features[0] = features; __cpu_model.__cpu_features[0] = features;
} }
/* A noinline function calling __get_cpuid. Having many calls to
cpuid in one function in 32-bit mode causes GCC to complain:
"can't find a register in class CLOBBERED_REGS". This is
related to PR rtl-optimization 44174. */
static int __attribute__ ((noinline))
__get_cpuid_output (unsigned int __level,
unsigned int *__eax, unsigned int *__ebx,
unsigned int *__ecx, unsigned int *__edx)
{
return __get_cpuid (__level, __eax, __ebx, __ecx, __edx);
}
/* A constructor function that is sets __cpu_model and __cpu_features with /* A constructor function that is sets __cpu_model and __cpu_features with
the right values. This needs to run only once. This constructor is the right values. This needs to run only once. This constructor is
given the highest priority and it should run before constructors without given the highest priority and it should run before constructors without
...@@ -406,7 +392,7 @@ __cpu_indicator_init (void) ...@@ -406,7 +392,7 @@ __cpu_indicator_init (void)
{ {
unsigned int eax, ebx, ecx, edx; unsigned int eax, ebx, ecx, edx;
int max_level = 5; int max_level;
unsigned int vendor; unsigned int vendor;
unsigned int model, family, brand_id; unsigned int model, family, brand_id;
unsigned int extended_model, extended_family; unsigned int extended_model, extended_family;
...@@ -416,7 +402,7 @@ __cpu_indicator_init (void) ...@@ -416,7 +402,7 @@ __cpu_indicator_init (void)
return 0; return 0;
/* Assume cpuid insn present. Run in level 0 to get vendor id. */ /* Assume cpuid insn present. Run in level 0 to get vendor id. */
if (!__get_cpuid_output (0, &eax, &ebx, &ecx, &edx)) if (!__get_cpuid (0, &eax, &ebx, &ecx, &edx))
{ {
__cpu_model.__cpu_vendor = VENDOR_OTHER; __cpu_model.__cpu_vendor = VENDOR_OTHER;
return -1; return -1;
...@@ -431,7 +417,7 @@ __cpu_indicator_init (void) ...@@ -431,7 +417,7 @@ __cpu_indicator_init (void)
return -1; return -1;
} }
if (!__get_cpuid_output (1, &eax, &ebx, &ecx, &edx)) if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
{ {
__cpu_model.__cpu_vendor = VENDOR_OTHER; __cpu_model.__cpu_vendor = VENDOR_OTHER;
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment