fix gcc build issue

This commit is contained in:
Ivan Blinkov 2018-12-18 16:18:30 +03:00
parent 362948e891
commit d7667ffe95

View File

@ -82,14 +82,13 @@ private:
const auto size_sse = size - (size % bytes_sse); const auto size_sse = size - (size % bytes_sse);
const auto whitespace_mask = _mm_set1_epi8(whitespace); const auto whitespace_mask = _mm_set1_epi8(whitespace);
constexpr auto base_sse_mode = _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_EACH | _SIDD_NEGATIVE_POLARITY; constexpr auto base_sse_mode = _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_EACH | _SIDD_NEGATIVE_POLARITY;
constexpr auto left_sse_mode = base_sse_mode | _SIDD_LEAST_SIGNIFICANT;
constexpr auto right_sse_mode = base_sse_mode | _SIDD_MOST_SIGNIFICANT;
auto mask = bytes_sse; auto mask = bytes_sse;
#endif #endif
if constexpr (mode::trim_left) { if constexpr (mode::trim_left) {
#if __SSE4_2__ #if __SSE4_2__
/// skip whitespace from left in blocks of up to 16 characters /// skip whitespace from left in blocks of up to 16 characters
constexpr auto left_sse_mode = base_sse_mode | _SIDD_LEAST_SIGNIFICANT;
while (mask == bytes_sse && chars_to_trim_left < size_sse) while (mask == bytes_sse && chars_to_trim_left < size_sse)
{ {
const auto chars = _mm_loadu_si128(reinterpret_cast<const __m128i *>(data + chars_to_trim_left)); const auto chars = _mm_loadu_si128(reinterpret_cast<const __m128i *>(data + chars_to_trim_left));
@ -103,6 +102,7 @@ private:
} }
if constexpr (mode::trim_right) { if constexpr (mode::trim_right) {
constexpr auto right_sse_mode = base_sse_mode | _SIDD_MOST_SIGNIFICANT;
const auto trim_right_size = size - chars_to_trim_left; const auto trim_right_size = size - chars_to_trim_left;
#if __SSE4_2__ #if __SSE4_2__
/// try to skip whitespace from right in blocks of up to 16 characters /// try to skip whitespace from right in blocks of up to 16 characters