diff options
author | jkim <jkim@FreeBSD.org> | 2009-01-22 17:06:33 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2009-01-22 17:06:33 +0000 |
commit | ad7caec2a5ab0f5b6d6a9e7bd939aeee91026da0 (patch) | |
tree | 3f42bbbf3936dd0c3b5a8810821faa79204f8769 /sys/compat/linprocfs | |
parent | 3959d9afa29c69635f686030e4b0f2a7571c184c (diff) | |
download | FreeBSD-src-ad7caec2a5ab0f5b6d6a9e7bd939aeee91026da0.zip FreeBSD-src-ad7caec2a5ab0f5b6d6a9e7bd939aeee91026da0.tar.gz |
Replace couple of strcmp(cpu_vendor, "foo") with cpu_vendor_id for i386
and hide i386-specific code under #ifdef.
Diffstat (limited to 'sys/compat/linprocfs')
-rw-r--r-- | sys/compat/linprocfs/linprocfs.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index fc2eacb..bf2b10c 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -276,11 +276,17 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) sbuf_cat(sb, "flags\t\t:"); - if (!strcmp(cpu_vendor, "AuthenticAMD") && (class < 6)) { - flags[16] = "fcmov"; - } else if (!strcmp(cpu_vendor, "CyrixInstead")) { +#ifdef __i386__ + switch (cpu_vendor_id) { + case CPU_VENDOR_AMD: + if (class < 6) + flags[16] = "fcmov"; + break; + case CPU_VENDOR_CYRIX: flags[24] = "cxmmx"; + break; } +#endif for (i = 0; i < 32; i++) if (cpu_feature & (1 << i)) |