Replace couple of strcmp(cpu_vendor, "foo") with cpu_vendor_id for i386

and hide i386-specific code under #ifdef.
This commit is contained in:
Jung-uk Kim 2009-01-22 17:06:33 +00:00
parent 7202abb694
commit 34fe89473f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=187594
2 changed files with 10 additions and 4 deletions

View File

@ -276,11 +276,17 @@ linprocfs_docpuinfo(PFS_FILL_ARGS)
sbuf_cat(sb, "flags\t\t:");
if (!strcmp(cpu_vendor, "AuthenticAMD") && (class < 6)) {
#ifdef __i386__
switch (cpu_vendor_id) {
case CPU_VENDOR_AMD:
if (class < 6)
flags[16] = "fcmov";
} else if (!strcmp(cpu_vendor, "CyrixInstead")) {
break;
case CPU_VENDOR_CYRIX:
flags[24] = "cxmmx";
break;
}
#endif
for (i = 0; i < 32; i++)
if (cpu_feature & (1 << i))

View File

@ -285,7 +285,7 @@ smist_identify(driver_t *driver, device_t parent)
return;
/* Check for a supported processor */
if (strcmp(cpu_vendor, "GenuineIntel") != 0)
if (cpu_vendor_id != CPU_VENDOR_INTEL)
return;
switch (cpu_id & 0xff0) {
case 0x680: /* Pentium III [coppermine] */