Skip to content

Commit

Permalink
Fix performance degradation with -m32
Browse files Browse the repository at this point in the history
  • Loading branch information
binhdvo committed Dec 14, 2021
1 parent 3e2a70b commit c2fe860
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/common/zstd_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,13 @@ static void ZSTD_copy16(void* dst, const void* src) {
vst1q_u8((uint8_t*)dst, vld1q_u8((const uint8_t*)src));
#elif defined(ZSTD_ARCH_X86_SSE2)
_mm_storeu_si128((__m128i*)dst, _mm_loadu_si128((const __m128i*)src));
#else
#elif defined(__clang__)
ZSTD_memmove(dst, src, 16);
#else
/* ZSTD_memmove is not inlined properly by gcc */
BYTE copy16_buf[16];
ZSTD_memcpy(copy16_buf, src, 16);
ZSTD_memcpy(dst, copy16_buf, 16);
#endif
}
#define COPY16(d,s) { ZSTD_copy16(d,s); d+=16; s+=16; }
Expand Down

0 comments on commit c2fe860

Please sign in to comment.