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, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
26 # define STRCAT __strcat_ssse3
29 # define USE_AS_STRCAT
33 # ifdef USE_AS_STRNCAT
37 # define RETURN jmp L(StartStrcpyPart)
38 # include "strlen-no-bsf.S"
44 lea (%rdi, %rax), %rdx
45 # ifdef USE_AS_STRNCAT
49 jbe L(StrncatExit8Bytes)
69 # ifdef USE_AS_STRNCAT
71 jb L(StrncatExit15Bytes)
87 # ifdef USE_AS_STRNCAT
90 # define USE_AS_STRNCPY
93 # include "strcpy-ssse3.S"
96 L(CopyFrom1To16Bytes):
138 movlpd 8(%rcx), %xmm1
140 movlpd %xmm1, 8(%rdx)
287 movlpd 5(%rcx), %xmm1
288 movlpd %xmm1, 5(%rdx)
299 movlpd 6(%rcx), %xmm1
300 movlpd %xmm1, 6(%rdx)
311 movlpd 7(%rcx), %xmm1
312 movlpd %xmm1, 7(%rdx)
322 movlpd 8(%rcx), %xmm1
324 movlpd %xmm1, 8(%rdx)
328 # ifdef USE_AS_STRNCPY
331 L(CopyFrom1To16BytesCase2):
334 lea (%rsi, %rdx), %rsi
412 movlpd 8(%rcx), %xmm1
413 movlpd %xmm1, 8(%rdx)
417 L(CopyFrom1To16BytesCase2OrCase3):
419 jnz L(CopyFrom1To16BytesCase2)
422 L(CopyFrom1To16BytesCase3):
468 movlpd 8(%rcx), %xmm1
469 movlpd %xmm1, 8(%rdx)
481 L(StrncatExit15Bytes):
506 movlpd 7(%rcx), %xmm1
507 movlpd %xmm1, 7(%rdx)
517 L(StrncatExit8Bytes):