diff options
Diffstat (limited to 'src/common/x64/cpu_detect.h')
| -rw-r--r-- | src/common/x64/cpu_detect.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/common/x64/cpu_detect.h b/src/common/x64/cpu_detect.h index e4f90bee1..3e6d808f3 100644 --- a/src/common/x64/cpu_detect.h +++ b/src/common/x64/cpu_detect.h | |||
| @@ -3,25 +3,32 @@ | |||
| 3 | 3 | ||
| 4 | #pragma once | 4 | #pragma once |
| 5 | 5 | ||
| 6 | #include <string_view> | ||
| 6 | #include "common/common_types.h" | 7 | #include "common/common_types.h" |
| 7 | 8 | ||
| 8 | namespace Common { | 9 | namespace Common { |
| 9 | 10 | ||
| 10 | enum class Manufacturer : u8 { | ||
| 11 | Intel = 0, | ||
| 12 | AMD = 1, | ||
| 13 | Hygon = 2, | ||
| 14 | Unknown = 3, | ||
| 15 | }; | ||
| 16 | |||
| 17 | /// x86/x64 CPU capabilities that may be detected by this module | 11 | /// x86/x64 CPU capabilities that may be detected by this module |
| 18 | struct CPUCaps { | 12 | struct CPUCaps { |
| 13 | |||
| 14 | enum class Manufacturer : u8 { | ||
| 15 | Unknown = 0, | ||
| 16 | Intel = 1, | ||
| 17 | AMD = 2, | ||
| 18 | Hygon = 3, | ||
| 19 | }; | ||
| 20 | |||
| 21 | static Manufacturer ParseManufacturer(std::string_view brand_string); | ||
| 22 | |||
| 19 | Manufacturer manufacturer; | 23 | Manufacturer manufacturer; |
| 20 | char cpu_string[0x21]; | 24 | char brand_string[13]; |
| 21 | char brand_string[0x41]; | 25 | |
| 26 | char cpu_string[48]; | ||
| 27 | |||
| 22 | u32 base_frequency; | 28 | u32 base_frequency; |
| 23 | u32 max_frequency; | 29 | u32 max_frequency; |
| 24 | u32 bus_frequency; | 30 | u32 bus_frequency; |
| 31 | |||
| 25 | bool sse : 1; | 32 | bool sse : 1; |
| 26 | bool sse2 : 1; | 33 | bool sse2 : 1; |
| 27 | bool sse3 : 1; | 34 | bool sse3 : 1; |