1 /* memcpy with unaliged loads
2 Copyright (C) 2013-2015 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
21 #include "asm-syntax.h"
24 ENTRY(__memcpy_sse2_unaligned)
26 leaq (%rdx,%rdx), %rcx
36 movdqu -16(%rsi,%rdx), %xmm8
37 movdqu %xmm8, -16(%rdi,%rdx)
45 movdqu 16(%rsi), %xmm8
47 movdqu %xmm8, 16(%rdi)
48 movdqu -32(%rsi,%rdx), %xmm8
49 movdqu %xmm8, -32(%rdi,%rdx)
51 movdqu 32(%rsi), %xmm8
53 movdqu %xmm8, 32(%rdi)
54 movdqu -48(%rsi,%rdx), %xmm8
55 movdqu %xmm8, -48(%rdi,%rdx)
56 movdqu 48(%rsi), %xmm8
57 movdqu %xmm8, 48(%rdi)
58 movdqu -64(%rsi,%rdx), %xmm8
59 movdqu %xmm8, -64(%rdi,%rdx)
78 movdqu (%rcx,%r10), %xmm8
80 movdqu (%rcx,%r9), %xmm8
81 movdqa %xmm8, 16(%rcx)
82 movdqu (%rcx,%r8), %xmm8
83 movdqa %xmm8, 32(%rcx)
84 movdqu (%rcx,%rax), %xmm8
85 movdqa %xmm8, 48(%rcx)
116 movdqu (%rsi,%rcx), %xmm8
118 movdqu %xmm8, (%rdi,%rcx)
125 movzbl (%rsi,%rax), %ecx
126 movb %cl, (%rdi,%rax)
144 movzwl -2(%rsi,%rdx), %eax
145 movw %ax, -2(%rdi,%rdx)
152 movzbl (%rsi,%rax), %edx
153 movb %dl, (%rdi,%rax)
159 movq -8(%rsi,%rdx), %rax
160 movq %rax, -8(%rdi,%rdx)
168 movl -4(%rsi,%rdx), %eax
169 movl %eax, -4(%rdi,%rdx)
171 END(__memcpy_sse2_unaligned)