1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-11-10 22:59:13 +00:00

Replace binary literals by hex literals

Fix #52, again.
This commit is contained in:
Xorg 2016-09-03 18:38:50 +02:00
parent 8f21ed54ab
commit 581ca840fa

View file

@ -601,23 +601,23 @@ static int get_amd_multipliers(struct msr_driver_t* handle, struct cpu_id_t *id,
CPU COF is (100MHz * (CpuFid + 10h) / (divisor specified by CpuDid)) */ CPU COF is (100MHz * (CpuFid + 10h) / (divisor specified by CpuDid)) */
err = cpu_rdmsr_range(handle, pstate, 8, 4, &CpuFid); err = cpu_rdmsr_range(handle, pstate, 8, 4, &CpuFid);
err += cpu_rdmsr_range(handle, pstate, 3, 0, &CpuDid); err += cpu_rdmsr_range(handle, pstate, 3, 0, &CpuDid);
if (CpuDid == 0b0000) if (CpuDid == 0x0)
divisor = 1; divisor = 1;
else if (CpuDid == 0b0001) else if (CpuDid == 0x1)
divisor = 1.5; divisor = 1.5;
else if (CpuDid == 0b0010) else if (CpuDid == 0x2)
divisor = 2; divisor = 2;
else if (CpuDid == 0b0011) else if (CpuDid == 0x3)
divisor = 3; divisor = 3;
else if (CpuDid == 0b0100) else if (CpuDid == 0x4)
divisor = 4; divisor = 4;
else if (CpuDid == 0b0101) else if (CpuDid == 0x5)
divisor = 6; divisor = 6;
else if (CpuDid == 0b0110) else if (CpuDid == 0x6)
divisor = 8; divisor = 8;
else if (CpuDid == 0b0111) else if (CpuDid == 0x7)
divisor = 12; divisor = 12;
else if (CpuDid == 0b1000) else if (CpuDid == 0x8)
divisor = 16; divisor = 16;
else else
divisor = 0; divisor = 0;