]> git.ipfire.org Git - thirdparty/zlib-ng.git/commit
Fix illegal instruction usage in Xeon Phi x200 processors
authorTulio Magno Quites Machado Filho <tuliom@redhat.com>
Tue, 14 May 2024 14:06:46 +0000 (11:06 -0300)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 19 Jun 2024 12:15:54 +0000 (14:15 +0200)
commit14930b875bb852a957104ef49ace91f08bbb1f05
treea877f5e14e4b6196f6fcc04d9c75165514fc4817
parent5d19734eec45d41d8d0e0208936039cbed0f1be1
Fix illegal instruction usage in Xeon Phi x200 processors

The Xeon Phi x200 family of processors (Knights Landing) supports
AVX512 (F, CD, ER, PF) but does not support AVX512 (VL, DQ, BW).

Because of processors like this, the Intel Software Developer's Manual
suggests the bits AVX512 (DQ,BW,VL) are also tested in EBX together with
AVX512F before deciding to run AVX512 (DQ,BW,VL) instructions.

This also adds a new x86 feature called avx512_common that indicates
that AVX512 (F,DQ,BW,VL) are all available and start using this for both
adler32_avx512 and crc32_vpclmulqdq implementations because they are
both built with -mavx512dq -mavx512bw -mavx512vl.

This has been reported downstream as
https://bugzilla.redhat.com/show_bug.cgi?id=2280347 .
arch/x86/x86_features.c
arch/x86/x86_features.h
functable.c
test/benchmarks/benchmark_adler32.cc
test/benchmarks/benchmark_adler32_copy.cc
test/benchmarks/benchmark_crc32.cc
test/test_adler32.cc
test/test_crc32.cc