[PATCH] D96220: [X86] Add AMD Renoir (znver2) model number to getHostCPUName and compiler-rt's getAMDProcessorTypeAndSubtype.
Andreas Mohr via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 7 09:03:07 PST 2021
and created this revision.
Herald added subscribers: dexonsmith, hiraditya, dberris.
and requested review of this revision.
Herald added projects: Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers.
This is the CPUID model used on Ryzen 4000 series (Zen 2/Renoir) CPUs.
https://www.amd.com/system/files/TechDocs/55922-A1-PUB.zip
This patch based on https://reviews.llvm.org/D70279
Signed-off-by: Andreas Mohr <and at gmx.li>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D96220
Files:
compiler-rt/lib/builtins/cpu_model.c
llvm/lib/Support/Host.cpp
Index: llvm/lib/Support/Host.cpp
===================================================================
--- llvm/lib/Support/Host.cpp
+++ llvm/lib/Support/Host.cpp
@@ -935,10 +935,10 @@
case 23:
CPU = "znver1";
*Type = X86::AMDFAM17H;
- if ((Model >= 0x30 && Model <= 0x3f) || Model == 0x71) {
+ if ((Model >= 0x30 && Model <= 0x3f) || Model == 0x60 || Model == 0x71) {
CPU = "znver2";
*Subtype = X86::AMDFAM17H_ZNVER2;
- break; // 30h-3fh, 71h: Zen2
+ break; // 30h-3fh, 60h, 71h: Zen2
}
if (Model <= 0x0f) {
*Subtype = X86::AMDFAM17H_ZNVER1;
Index: compiler-rt/lib/builtins/cpu_model.c
===================================================================
--- compiler-rt/lib/builtins/cpu_model.c
+++ compiler-rt/lib/builtins/cpu_model.c
@@ -542,10 +542,10 @@
case 23:
CPU = "znver1";
*Type = AMDFAM17H;
- if ((Model >= 0x30 && Model <= 0x3f) || Model == 0x71) {
+ if ((Model >= 0x30 && Model <= 0x3f) || Model == 0x60 || Model == 0x71) {
CPU = "znver2";
*Subtype = AMDFAM17H_ZNVER2;
- break; // 30h-3fh, 71h: Zen2
+ break; // 30h-3fh, 60h, 71h: Zen2
}
if (Model <= 0x0f) {
*Subtype = AMDFAM17H_ZNVER1;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96220.321993.patch
Type: text/x-patch
Size: 1220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210207/045c57c1/attachment.bin>
More information about the llvm-commits
mailing list