x64CPUDetect: Add detection for AMD Zen architecture

This commit is contained in:
Techjar 2020-01-26 21:38:51 -05:00
parent 15b9b6e76b
commit 52b52631c2
2 changed files with 4 additions and 0 deletions

View File

@ -54,6 +54,7 @@ struct CPUInfo
bool bLAHFSAHF64 = false;
bool bLongMode = false;
bool bAtom = false;
bool bZen = false;
// ARMv8 specific
bool bFP = false;

View File

@ -118,6 +118,9 @@ void CPUInfo::Detect()
(model == 0x1C || model == 0x26 || model == 0x27 || model == 0x35 || model == 0x36 ||
model == 0x37 || model == 0x4A || model == 0x4D || model == 0x5A || model == 0x5D))
bAtom = true;
// Detect AMD Zen (all models)
if (family == 23)
bZen = true;
logical_cpu_count = (cpu_id[1] >> 16) & 0xFF;
ht = (cpu_id[3] >> 28) & 1;