From: Florian Krohm Date: Thu, 24 Jul 2025 09:43:04 +0000 (+0000) Subject: tests/x86_amd_features.c: followup to 4810c14b5d X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=714b71ea5dc552d297b8759e18a9006ff3802d18;p=thirdparty%2Fvalgrind.git tests/x86_amd_features.c: followup to 4810c14b5d Do not rely on hardware identifying itself in a particular way. Enable lzcnt for non-AMD hardware. --- diff --git a/tests/x86_amd64_features.c b/tests/x86_amd64_features.c index 5a95e06df..955cca13b 100644 --- a/tests/x86_amd64_features.c +++ b/tests/x86_amd64_features.c @@ -102,7 +102,6 @@ static Bool go(char* cpu) } else if ( strcmp( cpu, "x86-lzcnt" ) == 0 ) { level = 0x80000001; cmask = 1 << 5; - require_amd = True; #if defined(VGA_amd64) } else if ( strcmp( cpu, "amd64-sse3" ) == 0 ) { level = 1; @@ -119,7 +118,6 @@ static Bool go(char* cpu) } else if ( strcmp( cpu, "amd64-lzcnt" ) == 0 ) { level = 0x80000001; cmask = 1 << 5; - require_amd = True; } else if ( strcmp( cpu, "amd64-sse42" ) == 0 ) { level = 1; cmask = 1 << 20; @@ -148,8 +146,7 @@ static Bool go(char* cpu) assert( !(cmask != 0 && dmask != 0 && bmask != 0) ); assert( !(cmask == 0 && dmask == 0 && bmask == 0) ); - if (require_amd && !vendorStringEquals("AuthenticAMD") && - !vendorStringEquals("GenuineIntel")) + if (require_amd && !vendorStringEquals("AuthenticAMD")) return FEATURE_NOT_PRESENT; // regardless of what that feature actually is