]> 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>
Sun, 19 May 2024 10:25:01 +0000 (12:25 +0200)
commit1a15c4b20e6ff63251ada13acc9bcaaf2b2c9b37
tree03d8a1d7fc63100e0e89438a39bc1d6b278ffecb
parent4104d8117b284a6dafe918581735bbf21d2f9c00
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