diff --git a/src/x86/name.c b/src/x86/name.c index 82a31ec8..e20bdb89 100644 --- a/src/x86/name.c +++ b/src/x86/name.c @@ -307,6 +307,15 @@ static bool transform_token(char* token_start, char* token_end, struct parser_st } break; case 4: + /* + * Erase everything starting with "with" on AMD + * processors, e.g. "AMD Ryzen 5 PRO 6650U with Radeon + * Graphics" + */ + if (erase_matching(token_start, token_length, "with")) { + return false; + } + /* Remember to erase "Dual Core" in "AMD Athlon(tm) 64 * X2 Dual Core Processor 3800+" */ if (memcmp(token_start, "Dual", token_length) == 0) { diff --git a/test/name/brand-string.cc b/test/name/brand-string.cc index 5cc9ba53..34d8063c 100644 --- a/test/name/brand-string.cc +++ b/test/name/brand-string.cc @@ -328,6 +328,7 @@ TEST(BRAND_STRING, amd) { "Phenom II X6 1055T", normalize_brand_string("AMD Phenom(tm) II X6 1055T Processor\0\0\0\0\0\0\0\0\0\0\0\0")); EXPECT_EQ("Ryzen 5 1500X", normalize_brand_string("AMD Ryzen 5 1500X Quad-Core Processor \0")); + EXPECT_EQ("Ryzen 5 PRO 6650U", normalize_brand_string("AMD Ryzen 5 PRO 6650U with Radeon Graphics \0")); EXPECT_EQ("Ryzen 7 1700X", normalize_brand_string("AMD Ryzen 7 1700X Eight-Core Processor \0")); EXPECT_EQ("Ryzen 7 1800X", normalize_brand_string("AMD Ryzen 7 1800X Eight-Core Processor \0")); EXPECT_EQ(