2 Copyright (C) 2011-2014 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 CFI_PUSH(REG) \
26 cfi_adjust_cfa_offset (4); \
27 cfi_rel_offset (REG, 0)
29 # define CFI_POP(REG) \
30 cfi_adjust_cfa_offset (-4); \
33 # define PUSH(REG) pushl REG; CFI_PUSH (REG)
34 # define POP(REG) popl REG; CFI_POP (REG)
37 # define STRCAT __strcat_ssse3
44 # ifdef USE_AS_STRNCAT
48 # define USE_AS_STRCAT
56 # define RETURN jmp L(StartStrcpyPart)
57 # include "strlen-sse2.S"
61 lea (%edi, %eax), %edx
62 # ifdef USE_AS_STRNCAT
68 jbe L(StrncatExit8Bytes)
88 # ifdef USE_AS_STRNCAT
90 jb L(StrncatExit15Bytes)
106 # ifdef USE_AS_STRNCAT
116 # define USE_AS_STRNCPY
118 # define RETURN1 POP (%edi); ret; CFI_PUSH (%edi)
120 # include "strcpy-ssse3.S"
122 L(CopyFrom1To16Bytes):
165 movlpd 8(%ecx), %xmm1
167 movlpd %xmm1, 8(%edx)
301 movlpd 5(%ecx), %xmm0
302 movlpd %xmm0, 5(%edx)
312 movlpd 6(%ecx), %xmm0
313 movlpd %xmm0, 6(%edx)
323 movlpd 7(%ecx), %xmm0
324 movlpd %xmm0, 7(%edx)
333 movlpd 8(%ecx), %xmm1
335 movlpd %xmm1, 8(%edx)
339 # ifdef USE_AS_STRNCPY
344 L(CopyFrom1To16BytesCase2):
347 lea (%esi, %edx), %esi
426 movlpd 8(%ecx), %xmm1
427 movlpd %xmm1, 8(%edx)
433 L(CopyFrom1To16BytesCase2OrCase3):
435 jnz L(CopyFrom1To16BytesCase2)
438 L(CopyFrom1To16BytesCase3):
485 movlpd 8(%ecx), %xmm1
486 movlpd %xmm1, 8(%edx)
497 L(StrncatExit15Bytes):
522 movlpd 7(%ecx), %xmm0
523 movlpd %xmm0, 7(%edx)
532 L(StrncatExit8Bytes):