From: Mark W. <ma...@kl...> - 2025-07-23 20:30:13
|
Hi Florian, On Wed, Jul 23, 2025 at 11:53:54AM +0200, Florian Krohm wrote: > While regtesting a patch for x86 to remove Iop_Clz32 (BZ 507033) I > noticed that the testcase none/tests/x86/lzcnt32 was not executed > due to lack of required prereqs. This of course is *the* interesting > testcase here. > > The reason it's not executed is because tests/x86_amd64_features.c has this: > > if (require_amd && !vendorStringEquals("AuthenticAMD")) > return FEATURE_NOT_PRESENT; > > My laptop identifies itself as "GenuineIntel". Therefore I propose > the regtested patch below. Anybody sees a problem with that? I think the issue is that LZCNT really is (or was?) AMD only. If executed on Intel it behaves like BSR (which is encoded the same). So the check as written seems as intended. But I believe since that test was written Intel introduced BMI, which includes LZCNT. So it might be that the x86-lzcnt (and amd64-lzcnt?) checks need to be rewritten to detect the cpu supports them (and executes them as LZCNT, not as BSR). But I am don't think just adding !vendorStringEquals("GenuineIntel") is the correct way to do that. Cheers, Mark |