1
0
mirror of https://github.com/google/cpu_features.git synced 2025-04-27 23:22:31 +02:00

Detect Zen 3 (K19) cpus (#152)

Co-authored-by: natanbc <natanbc@users.noreply.github.com>
This commit is contained in:
natanbc 2021-02-25 17:47:39 -03:00 committed by GitHub
parent e2f6dea65f
commit 7ed0b0e50e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -137,6 +137,7 @@ typedef enum {
AMD_BULLDOZER, // K15
AMD_JAGUAR, // K16
AMD_ZEN, // K17
AMD_ZEN3, // K19
} X86Microarchitecture;
// Returns the underlying microarchitecture by looking at X86Info's vendor,

View File

@ -1525,6 +1525,8 @@ X86Microarchitecture GetX86Microarchitecture(const X86Info* info) {
return AMD_JAGUAR;
case 0x17:
return AMD_ZEN;
case 0x19:
return AMD_ZEN3;
default:
return X86_UNKNOWN;
}
@ -1617,6 +1619,8 @@ const char* GetX86MicroarchitectureName(X86Microarchitecture uarch) {
return "AMD_JAGUAR";
case AMD_ZEN:
return "AMD_ZEN";
case AMD_ZEN3:
return "AMD_ZEN3";
}
return "unknown microarchitecture";
}