1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-12-16 16:35:45 +00:00

Merge pull request #57 from X0rg/master

Replace binary literals by hex literals
This commit is contained in:
Veselin Georgiev 2016-09-03 17:42:43 +01:00 committed by GitHub
commit 2fa79c9a26

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)) */
err = cpu_rdmsr_range(handle, pstate, 8, 4, &CpuFid);
err += cpu_rdmsr_range(handle, pstate, 3, 0, &CpuDid);
if (CpuDid == 0b0000)
if (CpuDid == 0x0)
divisor = 1;
else if (CpuDid == 0b0001)
else if (CpuDid == 0x1)
divisor = 1.5;
else if (CpuDid == 0b0010)
else if (CpuDid == 0x2)
divisor = 2;
else if (CpuDid == 0b0011)
else if (CpuDid == 0x3)
divisor = 3;
else if (CpuDid == 0b0100)
else if (CpuDid == 0x4)
divisor = 4;
else if (CpuDid == 0b0101)
else if (CpuDid == 0x5)
divisor = 6;
else if (CpuDid == 0b0110)
else if (CpuDid == 0x6)
divisor = 8;
else if (CpuDid == 0b0111)
else if (CpuDid == 0x7)
divisor = 12;
else if (CpuDid == 0b1000)
else if (CpuDid == 0x8)
divisor = 16;
else
divisor = 0;