2 Copyright (C) 2011-2018 Free Software Foundation, Inc.
3 Contributed by Intel Corporation.
4 This file is part of the GNU C Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
25 # define STRCAT __strcat_sse2_unaligned
28 # define USE_AS_STRCAT
33 # ifdef USE_AS_STRNCAT
37 /* Inline corresponding strlen file, temporary until new strcpy
38 implementation gets merged. */
70 pcmpeqb 16(%rax), %xmm0
75 pcmpeqb 32(%rax), %xmm1
80 pcmpeqb 48(%rax), %xmm2
85 pcmpeqb 64(%rax), %xmm3
90 pcmpeqb 80(%rax), %xmm0
96 pcmpeqb 32(%rax), %xmm1
101 pcmpeqb 48(%rax), %xmm2
106 pcmpeqb 64(%rax), %xmm3
111 pcmpeqb 80(%rax), %xmm0
117 pcmpeqb 32(%rax), %xmm1
122 pcmpeqb 48(%rax), %xmm2
127 pcmpeqb 64(%rax), %xmm3
132 pcmpeqb 80(%rax), %xmm0
138 pcmpeqb 32(%rax), %xmm1
143 pcmpeqb 48(%rax), %xmm2
148 pcmpeqb 64(%rax), %xmm3
156 pcmpeqb 80(%rax), %xmm0
165 pcmpeqb 16(%rax), %xmm1
174 pcmpeqb 16(%rax), %xmm2
183 pcmpeqb 16(%rax), %xmm3
193 pminub 16(%rax), %xmm4
194 movaps 32(%rax), %xmm5
195 pminub 48(%rax), %xmm5
203 pcmpeqb -64(%rax), %xmm0
209 pcmpeqb 32(%rax), %xmm1
214 pcmpeqb 48(%rax), %xmm2
219 pcmpeqb 64(%rax), %xmm3
225 jmp L(StartStrcpyPart)
233 jmp L(StartStrcpyPart)
241 jmp L(StartStrcpyPart)
249 jmp L(StartStrcpyPart)
257 jmp L(StartStrcpyPart)
268 lea (%r9, %rax), %rdi
270 mov %r9, %rax /* save result */
272 # ifdef USE_AS_STRNCAT
275 # define USE_AS_STRNCPY
278 # include "strcpy-sse2-unaligned.S"