pc: fix ugly and partially broken switch() statement

This commit is contained in:
aiju 2018-07-11 15:12:24 +01:00
parent 3a77c01f43
commit 6b0de3de8e

View file

@ -758,11 +758,13 @@ cpuidentify(void)
m->cpuidmodel = m->cpuidax >> 4 & 0xf; m->cpuidmodel = m->cpuidax >> 4 & 0xf;
m->cpuidstepping = m->cpuidax & 0xf; m->cpuidstepping = m->cpuidax & 0xf;
switch(m->cpuidfamily){ switch(m->cpuidfamily){
case 6:
m->cpuidmodel += m->cpuidax >> 16 & 0xf;
/* wet floor */
case 15: case 15:
m->cpuidfamily += m->cpuidax >> 20 & 0xff; 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 || if(strncmp(m->cpuidid, "AuthenticAMD", 12) == 0 ||