From 52b52631c2d241cb0eddebb85d3b0473955bab87 Mon Sep 17 00:00:00 2001 From: Techjar Date: Sun, 26 Jan 2020 21:38:51 -0500 Subject: [PATCH] x64CPUDetect: Add detection for AMD Zen architecture --- Source/Core/Common/CPUDetect.h | 1 + Source/Core/Common/x64CPUDetect.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Source/Core/Common/CPUDetect.h b/Source/Core/Common/CPUDetect.h index 4e619c5b8a..7ecc3e00cd 100644 --- a/Source/Core/Common/CPUDetect.h +++ b/Source/Core/Common/CPUDetect.h @@ -54,6 +54,7 @@ struct CPUInfo bool bLAHFSAHF64 = false; bool bLongMode = false; bool bAtom = false; + bool bZen = false; // ARMv8 specific bool bFP = false; diff --git a/Source/Core/Common/x64CPUDetect.cpp b/Source/Core/Common/x64CPUDetect.cpp index b66ea45cfa..0c3decba05 100644 --- a/Source/Core/Common/x64CPUDetect.cpp +++ b/Source/Core/Common/x64CPUDetect.cpp @@ -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;