ref: a509bb8a592f0e0685b207ba4794f4b544bac056
parent: 46e48ce25ccce1e9dfd533827c3271e421a3b99c
author: aiju <devnull@localhost>
date: Wed Jul 11 11:12:24 EDT 2018
pc: fix ugly and partially broken switch() statement
--- a/sys/src/9/pc/devarch.c
+++ b/sys/src/9/pc/devarch.c
@@ -758,11 +758,13 @@
m->cpuidmodel = m->cpuidax >> 4 & 0xf;
m->cpuidstepping = m->cpuidax & 0xf;
switch(m->cpuidfamily){- case 6:
- m->cpuidmodel += m->cpuidax >> 16 & 0xf;
- /* wet floor */
case 15:
m->cpuidfamily += m->cpuidax >> 20 & 0xff;
+ m->cpuidmodel += m->cpuidax >> 16 & 0xf;
+ break;
+ case 6:
+ m->cpuidmodel += m->cpuidax >> 16 & 0xf;
+ break;
}
if(strncmp(m->cpuidid, "AuthenticAMD", 12) == 0 ||
--
⑨