mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-24 17:50:51 +00:00
Merge pull request #1194 from ZeWaka/zewaka/fix-cpuid-parsing
fix CPUID parsing in TraceInfo
This commit is contained in:
@@ -899,8 +899,9 @@ void View::DrawInfo()
|
||||
const auto stepping = cpuId & 0xF;
|
||||
const auto baseModel = ( cpuId >> 4 ) & 0xF;
|
||||
const auto baseFamily = ( cpuId >> 8 ) & 0xF;
|
||||
const auto extModel = ( cpuId >> 12 ) & 0xF;
|
||||
const auto extFamily = ( cpuId >> 16 );
|
||||
// 12-15 unused
|
||||
const auto extModel = ( cpuId >> 16 ) & 0xF;
|
||||
const auto extFamily = ( cpuId >> 20 ) & 0xFF;
|
||||
|
||||
const uint32_t model = ( baseFamily == 6 || baseFamily == 15 ) ? ( ( extModel << 4 ) | baseModel ) : baseModel;
|
||||
const uint32_t family = baseFamily == 15 ? baseFamily + extFamily : baseFamily;
|
||||
|
||||
Reference in New Issue
Block a user