2 Copyright (C) 2011 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
36 # define RETURN jmp L(StartStrcpyPart)
37 # include "strlen-sse2-no-bsf.S"
43 lea (%rdi, %rax), %rdx
44 # ifdef USE_AS_STRNCAT
48 jbe L(StrncatExit8Bytes)
68 # ifdef USE_AS_STRNCAT
70 jb L(StrncatExit15Bytes)
86 # ifdef USE_AS_STRNCAT
89 # define USE_AS_STRNCPY
92 # include "strcpy-ssse3.S"
95 L(CopyFrom1To16Bytes):
137 movlpd 8(%rcx), %xmm1
139 movlpd %xmm1, 8(%rdx)
286 movlpd 5(%rcx), %xmm1
287 movlpd %xmm1, 5(%rdx)
298 movlpd 6(%rcx), %xmm1
299 movlpd %xmm1, 6(%rdx)
310 movlpd 7(%rcx), %xmm1
311 movlpd %xmm1, 7(%rdx)
321 movlpd 8(%rcx), %xmm1
323 movlpd %xmm1, 8(%rdx)
327 # ifdef USE_AS_STRNCPY
330 L(CopyFrom1To16BytesCase2):
333 lea (%rsi, %rdx), %rsi
411 movlpd 8(%rcx), %xmm1
412 movlpd %xmm1, 8(%rdx)
416 L(CopyFrom1To16BytesCase2OrCase3):
418 jnz L(CopyFrom1To16BytesCase2)
421 L(CopyFrom1To16BytesCase3):
467 movlpd 8(%rcx), %xmm1
468 movlpd %xmm1, 8(%rdx)
480 L(StrncatExit15Bytes):
505 movlpd 7(%rcx), %xmm1
506 movlpd %xmm1, 7(%rdx)
516 L(StrncatExit8Bytes):