]> git.ipfire.org Git - thirdparty/suricata.git/commit
memcmp: work around GCC 12+ 'blend' issues
authorVictor Julien <vjulien@oisf.net>
Fri, 6 May 2022 15:46:40 +0000 (17:46 +0200)
committerVictor Julien <vjulien@oisf.net>
Mon, 9 May 2022 11:30:20 +0000 (13:30 +0200)
commit87c5d6943709de225d946f5eab8f1d24cdefa491
treeece2c5d6004133546a3508f3d2486e6156829c12
parentca97ed44361fe84cae72fad1807825f149f983eb
memcmp: work around GCC 12+ 'blend' issues

Since GCC 12 the memcmp code using `_mm_blendv_epi8` failed to work.
Inspection of the disassembled objects suggests that it simply omits
the instruction on systems that are not AVX512 capable. On AVX512
it does replace it with VPCMPB logic that appears to work.

Luckily our use of blend is actually uncessary. A simple AND is sufficient.

Bug: #5312.
src/util-memcmp.h