diff options
author | davej <davej> | 2002-07-12 00:56:19 +0000 |
---|---|---|
committer | davej <davej> | 2002-07-12 00:56:19 +0000 |
commit | 35fd00115de8dfe9879d581bf051a5cd9a2fe2eb (patch) | |
tree | 7017b806e143018b160cc8ec890988ea3d661075 /Cyrix | |
parent | b3230787d14cd7d0ce1e6b91a28c257875cbf97a (diff) |
more tuple cleanups
Diffstat (limited to 'Cyrix')
-rw-r--r-- | Cyrix/identify.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/Cyrix/identify.c b/Cyrix/identify.c index 647121b..682b717 100644 --- a/Cyrix/identify.c +++ b/Cyrix/identify.c @@ -1,5 +1,5 @@ /* - * $Id: identify.c,v 1.10 2002/07/12 00:48:56 davej Exp $ + * $Id: identify.c,v 1.11 2002/07/12 00:56:19 davej Exp $ * This file is part of x86info. * (C) 2001 Dave Jones. * @@ -35,49 +35,49 @@ void Identify_Cyrix (struct cpudata *cpu) cpu->vendor = VENDOR_CYRIX; /* Do standard stuff */ - if (cpu->maxi >= 1) { - cpuid (cpu->number, 1, &eax, &ebx, &ecx, &edx); + if (cpu->maxi < 1) + return; + + cpuid (cpu->number, 1, &eax, &ebx, &ecx, &edx); + cpu->stepping = eax & 0xf; + cpu->model = (eax >> 4) & 0xf; + cpu->family = (eax >> 8) & 0xf; + + switch (tuple(cpu) & 0xff0) { + case 0x450: sprintf (cpu->name, "%s", "MediaGX"); + break; + + case 0x520: sprintf (cpu->name, "%s", "6x86"); + break; + case 0x524: sprintf (cpu->name, "%s", "GXm"); + break; + + case 0x600: sprintf (cpu->name, "%s", "6x86/MX"); + break; + case 0x620: sprintf (cpu->name, "%s", "MII"); + break; + default: sprintf (cpu->name, "%s", "Unknown CPU"); + break; + } + + /* Check for presence of extended info */ + if (cpu->maxei < 0x80000000) + return; + + if (cpu->maxei >= 0x80000001) { + cpuid (cpu->number, 0x80000001, &eax, &ebx, &ecx, &edx); cpu->stepping = eax & 0xf; cpu->model = (eax >> 4) & 0xf; cpu->family = (eax >> 8) & 0xf; - switch (tuple(cpu) & 0xff0) { - case 0x450: sprintf (cpu->name, "%s", "MediaGX"); - break; - - case 0x520: sprintf (cpu->name, "%s", "6x86"); - break; - case 0x524: sprintf (cpu->name, "%s", "GXm"); - break; - - case 0x600: sprintf (cpu->name, "%s", "6x86/MX"); - break; - case 0x620: sprintf (cpu->name, "%s", "MII"); - break; - default: sprintf (cpu->name, "%s", "Unknown CPU"); - break; + switch (cpu->family) { + case 4: sprintf (cpu->name, "MediaGX"); + break; + case 5: sprintf (cpu->name, "6x86/GXm"); + break; + case 6: sprintf (cpu->name, "6x86/MX"); + break; } - - /* Check for presence of extended info */ - if (cpu->maxei < 0x80000000) - return; - - if (cpu->maxei >= 0x80000001) { - cpuid (cpu->number, 0x80000001, &eax, &ebx, &ecx, &edx); - cpu->stepping = eax & 0xf; - cpu->model = (eax >> 4) & 0xf; - cpu->family = (eax >> 8) & 0xf; - - switch (cpu->family) { - case 4: sprintf (cpu->name, "MediaGX"); - break; - case 5: sprintf (cpu->name, "6x86/GXm"); - break; - case 6: sprintf (cpu->name, "6x86/MX"); - break; - } - } - } } |