From a63d62fb4ec4e9c6746cc68505bdbc06440154a9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 11 Jan 2024 12:00:55 +0530 Subject: [PATCH] ... --- kitty/simd-string-impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/simd-string-impl.h b/kitty/simd-string-impl.h index a829d6ecb..36e293cea 100644 --- a/kitty/simd-string-impl.h +++ b/kitty/simd-string-impl.h @@ -343,7 +343,6 @@ FUNC(utf8_decode_to_esc)(UTF8Decoder *d, const uint8_t *src, size_t src_sz) { } else d->num_consumed = src_sz; if (src_sz < sizeof(integer_t)) vec = zero_last_n_bytes(vec, sizeof(integer_t) - src_sz); - const integer_t one = set1_epi8(1), two = set1_epi8(2), three = set1_epi8(3); // Classify the bytes print_register_as_bytes(vec); integer_t state = set1_epi8(0x80); @@ -369,6 +368,7 @@ FUNC(utf8_decode_to_esc)(UTF8Decoder *d, const uint8_t *src, size_t src_sz) { print_register_as_bytes(mask); integer_t count = and_si(state, set1_epi8(0x7)); // keep lower 3 bits of state print_register_as_bytes(count); + const integer_t one = set1_epi8(1), two = set1_epi8(2), three = set1_epi8(3); // count contains the number of bytes in the sequence for the start byte of every sequence and zero elsewhere // shift 02 bytes by 1 and subtract 1 integer_t count_subs1 = subtract_saturate_epu8(count, one);