2 Copyright (C) 2011-2015 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_ssse3
28 # define USE_AS_STRCAT
32 # ifdef USE_AS_STRNCAT
37 /* Inline corresponding strlen file, temporary until new strcpy
38 implementation gets merged. */
102 pcmpeqb (%rax), %xmm3
108 pcmpeqb (%rax), %xmm0
114 pcmpeqb (%rax), %xmm1
120 pcmpeqb (%rax), %xmm2
126 pcmpeqb (%rax), %xmm3
132 pcmpeqb (%rax), %xmm0
138 pcmpeqb (%rax), %xmm1
144 pcmpeqb (%rax), %xmm2
150 pcmpeqb (%rax), %xmm3
156 pcmpeqb (%rax), %xmm0
162 pcmpeqb (%rax), %xmm1
168 pcmpeqb (%rax), %xmm2
174 pcmpeqb (%rax), %xmm3
184 pcmpeqb (%rax), %xmm0
185 pcmpeqb 16(%rax), %xmm1
186 pcmpeqb 32(%rax), %xmm2
187 pcmpeqb 48(%rax), %xmm3
189 pmovmskb %xmm1, %r11d
190 pmovmskb %xmm2, %r10d
199 jnz L(aligned_64_exit_16)
201 jnz L(aligned_64_exit_32)
203 jnz L(aligned_64_exit_48)
205 L(aligned_64_exit_64):
209 L(aligned_64_exit_48):
214 L(aligned_64_exit_32):
219 L(aligned_64_exit_16):
248 jmp L(StartStrcpyPart)
274 jmp L(StartStrcpyPart)
279 jmp L(StartStrcpyPart)
284 jmp L(StartStrcpyPart)
289 jmp L(StartStrcpyPart)
294 jmp L(StartStrcpyPart)
299 jmp L(StartStrcpyPart)
304 jmp L(StartStrcpyPart)
309 jmp L(StartStrcpyPart)
314 jmp L(StartStrcpyPart)
319 jmp L(StartStrcpyPart)
324 jmp L(StartStrcpyPart)
329 jmp L(StartStrcpyPart)
334 jmp L(StartStrcpyPart)
339 jmp L(StartStrcpyPart)
344 jmp L(StartStrcpyPart)
353 lea (%rdi, %rax), %rdx
354 # ifdef USE_AS_STRNCAT
358 jbe L(StrncatExit8Bytes)
378 # ifdef USE_AS_STRNCAT
380 jb L(StrncatExit15Bytes)
396 # ifdef USE_AS_STRNCAT
399 # define USE_AS_STRNCPY
402 # include "strcpy-ssse3.S"
405 L(CopyFrom1To16Bytes):
447 movlpd 8(%rcx), %xmm1
449 movlpd %xmm1, 8(%rdx)
596 movlpd 5(%rcx), %xmm1
597 movlpd %xmm1, 5(%rdx)
608 movlpd 6(%rcx), %xmm1
609 movlpd %xmm1, 6(%rdx)
620 movlpd 7(%rcx), %xmm1
621 movlpd %xmm1, 7(%rdx)
631 movlpd 8(%rcx), %xmm1
633 movlpd %xmm1, 8(%rdx)
637 # ifdef USE_AS_STRNCPY
640 L(CopyFrom1To16BytesCase2):
643 lea (%rsi, %rdx), %rsi
721 movlpd 8(%rcx), %xmm1
722 movlpd %xmm1, 8(%rdx)
726 L(CopyFrom1To16BytesCase2OrCase3):
728 jnz L(CopyFrom1To16BytesCase2)
731 L(CopyFrom1To16BytesCase3):
777 movlpd 8(%rcx), %xmm1
778 movlpd %xmm1, 8(%rdx)
790 L(StrncatExit15Bytes):
815 movlpd 7(%rcx), %xmm1
816 movlpd %xmm1, 7(%rdx)
826 L(StrncatExit8Bytes):