From bec540e05f282926911394b141dc287f3f04a66d Mon Sep 17 00:00:00 2001 From: dantengsky Date: Wed, 15 Jun 2022 16:07:13 +0800 Subject: [PATCH] fix compile error: native build with sse42 capability --- common/io/src/position.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/common/io/src/position.rs b/common/io/src/position.rs index bb1bad14f7bc3..5a8c36f6f301a 100644 --- a/common/io/src/position.rs +++ b/common/io/src/position.rs @@ -381,17 +381,13 @@ fn position_sse42< if POSITIVE { if _mm_cmpestrc::<0>(chars_set, chars_count, bytes, 16) > 0 { - return index + _mm_cmpestri::<0>(chars_set, chars_count, bytes, 16); + return index + _mm_cmpestri::<0>(chars_set, chars_count, bytes, 16) as usize; } } else { if _mm_cmpestrc::<_SIDD_NEGATIVE_POLARITY>(chars_set, chars_count, bytes, 16) > 0 { return index - + _mm_cmpestri::<_SIDD_NEGATIVE_POLARITY>( - chars_set, - chars_count, - bytes, - 16, - ); + + _mm_cmpestri::<_SIDD_NEGATIVE_POLARITY>(chars_set, chars_count, bytes, 16) + as usize; } }