aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/memcpy_sse3.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/memcpy_sse3.h')
-rw-r--r--src/vppinfra/memcpy_sse3.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/vppinfra/memcpy_sse3.h b/src/vppinfra/memcpy_sse3.h
index 4fc48c86c8b..f61396c8922 100644
--- a/src/vppinfra/memcpy_sse3.h
+++ b/src/vppinfra/memcpy_sse3.h
@@ -51,19 +51,20 @@
#include <stdint.h>
#include <x86intrin.h>
-typedef u8 u8x16u __attribute__ ((vector_size (16), aligned (1)));
-typedef u8 u8x32u __attribute__ ((vector_size (32), aligned (1)));
-
static inline void
clib_mov16 (u8 * dst, const u8 * src)
{
- *(u8x16u *) dst = *(u8x16u *) src;
+ __m128i xmm0;
+
+ xmm0 = _mm_loadu_si128 ((const __m128i *) src);
+ _mm_storeu_si128 ((__m128i *) dst, xmm0);
}
static inline void
clib_mov32 (u8 * dst, const u8 * src)
{
- *(u8x32u *) dst = *(u8x32u *) src;
+ clib_mov16 ((u8 *) dst + 0 * 16, (const u8 *) src + 0 * 16);
+ clib_mov16 ((u8 *) dst + 1 * 16, (const u8 *) src + 1 * 16);
}
static inline void