]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Fix __m128i_u / __m256i_u alignment
authorHolger Hoffstätte <holger@applied-asynchrony.com>
Mon, 4 Sep 2023 12:00:20 +0000 (14:00 +0200)
committerWayne Davison <wayne@opencoder.net>
Wed, 20 Nov 2024 05:28:39 +0000 (21:28 -0800)
Building with clang-16 complains with:
./simd-checksum-x86_64.cpp:204:25: warning: passing 1-byte aligned argument to
  16-byte aligned parameter 1 of '_mm_store_si128' may result in an unaligned pointer
  access [-Walign-mismatch]

Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
simd-checksum-x86_64.cpp

index 33f26e9205c5c1ac41417e59209dbf25eb3748ce..d649091ea8bee6c80b247352a0b8ef7bd1494f69 100644 (file)
@@ -68,8 +68,8 @@
 #endif
 
 // Missing from the headers on gcc 6 and older, clang 8 and older
-typedef long long __m128i_u __attribute__((__vector_size__(16), __may_alias__, __aligned__(1)));
-typedef long long __m256i_u __attribute__((__vector_size__(32), __may_alias__, __aligned__(1)));
+typedef long long __m128i_u __attribute__((__vector_size__(16), __may_alias__, __aligned__(16)));
+typedef long long __m256i_u __attribute__((__vector_size__(32), __may_alias__, __aligned__(16)));
 
 /* Compatibility macros to let our SSSE3 algorithm run with only SSE2.
    These used to be neat individual functions with target attributes switching between SSE2 and SSSE3 implementations