Skip to content

Commit

Permalink
Util: Recognize zen5 processors
Browse files Browse the repository at this point in the history
as reported by drzed
  • Loading branch information
zzzi2p committed Jan 21, 2025
1 parent 0dddf3b commit 099c9bc
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions core/java/src/freenet/support/CPUInformation/AMDInfoImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,12 @@ private String identifyCPU()
}
break;

// Zen / Zen+ / Zen2 / Zen3 / Zen4 / Ryzen 3/5/7/9/Threadripper / EPYC
// Zen / Zen+ / Zen2 / Zen3 / Zen4 / Zen5 / Ryzen 3/5/7/9/Threadripper / EPYC
// untested
case 23:
case 25: {
case 23: // zen / zen+ / zen2
case 25: // zen3 / zen3+ / zen4
case 26: // zen5
{
// Quote wikipedia:
// Zen is a clean sheet design that differs from the long-standing Bulldozer architecture.
// All models support: x87, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AES, CLMUL,
Expand All @@ -495,8 +497,10 @@ private String identifyCPU()
// Each instruction uses its own CPUID bit.
// As of GMP 6.2.0, the difference is only some parameter tweaks,
// and zen2 is actually a little slower than zen.
isZen2Compatible = family == 25;
if (isZen2Compatible)
isZen2Compatible = family != 23;
if (family == 26)
modelString = "Ryzen/Epyc Zen 5 model " + model;
else if (isZen2Compatible)
modelString = "Ryzen/Epyc Zen 3 model " + model;
else if (model == 1)
modelString = "Ryzen 7";
Expand Down

0 comments on commit 099c9bc

Please sign in to comment.