i386-cpuinfo.c: Set __cpu_vendor always.

2012-04-24  Sriraman Tallam  <tmsriram@google.com>

	* libgcc/config/i386/i386-cpuinfo.c: Set __cpu_vendor always.

From-SVN: r186795
This commit is contained in:
Sriraman Tallam 2012-04-25 02:04:22 +00:00 committed by Sriraman Tallam
parent 3b34ddb8e0
commit ad491329d9
2 changed files with 16 additions and 3 deletions

View file

@ -1,3 +1,7 @@
2012-04-24 Sriraman Tallam <tmsriram@google.com>
* libgcc/config/i386/i386-cpuinfo.c: Set __cpu_vendor always.
2012-04-24 Sriraman Tallam <tmsriram@google.com>
* libgcc/config/i386/i386-cpuinfo.c: New file.

View file

@ -256,16 +256,25 @@ __cpu_indicator_init (void)
/* Assume cpuid insn present. Run in level 0 to get vendor id. */
if (!__get_cpuid_output (0, &eax, &ebx, &ecx, &edx))
return -1;
{
__cpu_model.__cpu_vendor = VENDOR_OTHER;
return -1;
}
vendor = ebx;
max_level = eax;
if (max_level < 1)
return -1;
{
__cpu_model.__cpu_vendor = VENDOR_OTHER;
return -1;
}
if (!__get_cpuid_output (1, &eax, &ebx, &ecx, &edx))
return -1;
{
__cpu_model.__cpu_vendor = VENDOR_OTHER;
return -1;
}
model = (eax >> 4) & 0x0f;
family = (eax >> 8) & 0x0f;