diff options
Diffstat (limited to 'src/common/x64/cpu_detect.cpp')
| -rw-r--r-- | src/common/x64/cpu_detect.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/x64/cpu_detect.cpp b/src/common/x64/cpu_detect.cpp index e54383a4a..c998b1197 100644 --- a/src/common/x64/cpu_detect.cpp +++ b/src/common/x64/cpu_detect.cpp | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include "common/common_types.h" | 14 | #include "common/common_types.h" |
| 15 | #include "common/logging/log.h" | 15 | #include "common/logging/log.h" |
| 16 | #include "common/x64/cpu_detect.h" | 16 | #include "common/x64/cpu_detect.h" |
| 17 | #include "common/x64/rdtsc.h" | ||
| 17 | 18 | ||
| 18 | #ifdef _WIN32 | 19 | #ifdef _WIN32 |
| 19 | #include <windows.h> | 20 | #include <windows.h> |
| @@ -144,6 +145,7 @@ static CPUCaps Detect() { | |||
| 144 | caps.bmi2 = Common::Bit<8>(cpu_id[1]); | 145 | caps.bmi2 = Common::Bit<8>(cpu_id[1]); |
| 145 | caps.sha = Common::Bit<29>(cpu_id[1]); | 146 | caps.sha = Common::Bit<29>(cpu_id[1]); |
| 146 | 147 | ||
| 148 | caps.waitpkg = Common::Bit<5>(cpu_id[2]); | ||
| 147 | caps.gfni = Common::Bit<8>(cpu_id[2]); | 149 | caps.gfni = Common::Bit<8>(cpu_id[2]); |
| 148 | 150 | ||
| 149 | __cpuidex(cpu_id, 0x00000007, 0x00000001); | 151 | __cpuidex(cpu_id, 0x00000007, 0x00000001); |
| @@ -186,6 +188,8 @@ static CPUCaps Detect() { | |||
| 186 | caps.tsc_frequency = static_cast<u64>(caps.crystal_frequency) * | 188 | caps.tsc_frequency = static_cast<u64>(caps.crystal_frequency) * |
| 187 | caps.tsc_crystal_ratio_numerator / | 189 | caps.tsc_crystal_ratio_numerator / |
| 188 | caps.tsc_crystal_ratio_denominator; | 190 | caps.tsc_crystal_ratio_denominator; |
| 191 | } else { | ||
| 192 | caps.tsc_frequency = X64::EstimateRDTSCFrequency(); | ||
| 189 | } | 193 | } |
| 190 | } | 194 | } |
| 191 | 195 | ||