From 25aa6ad2ed3d557ce3264fba4a19c5529515beaf Mon Sep 17 00:00:00 2001 From: aqrit <4021602+aqrit@users.noreply.github.com> Date: Sat, 2 Dec 2023 12:50:38 -0500 Subject: [PATCH] reverse the alias between _mm_testnzc_si128 and _mm_test_mix_ones_zeros This allows us to write the call other functions without a forward declare --- sse2neon.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sse2neon.h b/sse2neon.h index 7d06dd82..acc50f59 100644 --- a/sse2neon.h +++ b/sse2neon.h @@ -7593,10 +7593,7 @@ FORCE_INLINE int _mm_test_all_zeros(__m128i a, __m128i mask) // otherwise return 0. // https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=mm_test_mix_ones_zero // Note: Argument names may be wrong in the Intel intrinsics guide. -FORCE_INLINE int _mm_test_mix_ones_zeros(__m128i a, __m128i mask) -{ - return !(_mm_testz_si128(a, mask) | _mm_testc_si128(a, mask)); -} +#define _mm_test_mix_ones_zeros(a, b) _mm_testnzc_si128(a, b) // Compute the bitwise AND of 128 bits (representing integer data) in a and b, // and set ZF to 1 if the result is zero, otherwise set ZF to 0. Compute the @@ -7616,7 +7613,10 @@ FORCE_INLINE int _mm_testc_si128(__m128i a, __m128i b) // otherwise set CF to 0. Return 1 if both the ZF and CF values are zero, // otherwise return 0. // https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_testnzc_si128 -#define _mm_testnzc_si128(a, b) _mm_test_mix_ones_zeros(a, b) +FORCE_INLINE int _mm_testnzc_si128(__m128i a, __m128i b) +{ + return !(_mm_test_all_zeros(a, b) | _mm_testc_si128(a, b)); +} // Compute the bitwise AND of 128 bits (representing integer data) in a and b, // and set ZF to 1 if the result is zero, otherwise set ZF to 0. Compute the