From: Konstantinos Margaritis Date: Fri, 8 Oct 2021 21:29:33 +0000 (+0300) Subject: use movemask X-Git-Tag: v5.4.3+vectorscan~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eebd6c97bc32366aeb74067eb48a8dda468a7729;p=thirdparty%2Fvectorscan.git use movemask --- diff --git a/src/util/arch/x86/match.hpp b/src/util/arch/x86/match.hpp index 6785cb15..159f7355 100644 --- a/src/util/arch/x86/match.hpp +++ b/src/util/arch/x86/match.hpp @@ -30,6 +30,7 @@ template <> really_really_inline const u8 *firstMatch<16>(const u8 *buf, SuperVector<16> v) { + SuperVector<16>::movemask_type z = v.movemask(); DEBUG_PRINTF("buf %p z %08x \n", buf, z); DEBUG_PRINTF("z %08x\n", z); if (unlikely(z != 0xffff)) { @@ -46,6 +47,7 @@ const u8 *firstMatch<16>(const u8 *buf, SuperVector<16> v) { template <> really_really_inline const u8 *firstMatch<32>(const u8 *buf, SuperVector<32> v) { + SuperVector<32>::movemask_type z = v.movemask(); DEBUG_PRINTF("z 0x%08x\n", z); if (unlikely(z != 0xffffffff)) { u32 pos = ctz32(~z); @@ -59,6 +61,7 @@ const u8 *firstMatch<32>(const u8 *buf, SuperVector<32> v) { template <> really_really_inline const u8 *firstMatch<64>(const u8 *buf, SuperVector<64>v) { + SuperVector<64>::movemask_type z = v.movemask(); DEBUG_PRINTF("z 0x%016llx\n", z); if (unlikely(z != ~0ULL)) { u32 pos = ctz64(~z); @@ -73,6 +76,7 @@ const u8 *firstMatch<64>(const u8 *buf, SuperVector<64>v) { template <> really_really_inline const u8 *lastMatch<16>(const u8 *buf, SuperVector<16> v) { + SuperVector<16>::movemask_type z = v.movemask(); DEBUG_PRINTF("buf %p z %08x \n", buf, z); DEBUG_PRINTF("z %08x\n", z); if (unlikely(z != 0xffff)) { @@ -89,6 +93,7 @@ const u8 *lastMatch<16>(const u8 *buf, SuperVector<16> v) { template<> really_really_inline const u8 *lastMatch<32>(const u8 *buf, SuperVector<32> v) { + SuperVector<32>::movemask_type z = v.movemask(); if (unlikely(z != 0xffffffff)) { u32 pos = clz32(~z); DEBUG_PRINTF("buf=%p, pos=%u\n", buf, pos); @@ -102,6 +107,7 @@ const u8 *lastMatch<32>(const u8 *buf, SuperVector<32> v) { template <> really_really_inline const u8 *lastMatch<64>(const u8 *buf, SuperVector<64> v) { + SuperVector<64>::movemask_type z = v.movemask(); DEBUG_PRINTF("z 0x%016llx\n", z); if (unlikely(z != ~0ULL)) { u32 pos = clz64(~z);