diff options
author | Nathan Moinvaziri <nathan@nathanm.com> | 2020-08-02 11:20:43 -0700 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2020-08-14 22:20:50 +0200 |
commit | a0f9ea265f8c08256986a37e57baacf124db61dc (patch) | |
tree | ddda901536862b2bf39a987710125bf0ff501202 /arch | |
parent | fc4c480c131f1b7f77b2be07f1c1c7ee3f1959a5 (diff) |
Cast wsize as early as possible in slide_hash for AVX2 and SSE2.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/slide_avx.c | 4 | ||||
-rw-r--r-- | arch/x86/slide_sse.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/slide_avx.c b/arch/x86/slide_avx.c index 7ed7c02..6083dc7 100644 --- a/arch/x86/slide_avx.c +++ b/arch/x86/slide_avx.c @@ -17,8 +17,8 @@ ZLIB_INTERNAL void slide_hash_avx2(deflate_state *s) { Pos *p; unsigned n; - unsigned wsize = s->w_size; - const __m256i zmm_wsize = _mm256_set1_epi16((uint16_t)wsize); + uint16_t wsize = (uint16_t)s->w_size; + const __m256i zmm_wsize = _mm256_set1_epi16(wsize); n = s->hash_size; p = &s->head[n] - 16; diff --git a/arch/x86/slide_sse.c b/arch/x86/slide_sse.c index f012e04..f57a7d3 100644 --- a/arch/x86/slide_sse.c +++ b/arch/x86/slide_sse.c @@ -16,8 +16,8 @@ ZLIB_INTERNAL void slide_hash_sse2(deflate_state *s) { Pos *p; unsigned n; - unsigned wsize = s->w_size; - const __m128i xmm_wsize = _mm_set1_epi16((uint16_t)wsize); + uint16_t wsize = (uint16_t)s->w_size; + const __m128i xmm_wsize = _mm_set1_epi16(wsize); n = s->hash_size; p = &s->head[n] - 8; |