ref: 6b0de3de8e935098b7bd0c09efc476d63a7a236e
parent: 3a77c01f43821dcc4f7cae54aff89bb20f2d95a5
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 ||