2 Copyright (C) 2010 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
24 #include "asm-syntax.h"
26 #define CFI_PUSH(REG) \
27 cfi_adjust_cfa_offset (4); \
28 cfi_rel_offset (REG, 0)
30 #define CFI_POP(REG) \
31 cfi_adjust_cfa_offset (-4); \
34 #define PUSH(REG) pushl REG; CFI_PUSH (REG)
35 #define POP(REG) popl REG; CFI_POP (REG)
37 #ifndef USE_AS_STRNCMP
39 # define STRCMP __strcmp_sse4_2
43 # define RETURN ret; .p2align 4
46 # define STRCMP __strncmp_sse4_2
51 # define RETURN POP (%ebp); ret; .p2align 4; CFI_PUSH (%ebp)
54 .section .text.sse4.2,"ax",@progbits
100 #ifdef USE_AS_STRNCMP
111 #ifdef USE_AS_STRNCMP
121 #ifdef USE_AS_STRNCMP
131 #ifdef USE_AS_STRNCMP
141 #ifdef USE_AS_STRNCMP
151 #ifdef USE_AS_STRNCMP
161 #ifdef USE_AS_STRNCMP
171 #ifdef USE_AS_STRNCMP
181 #ifdef USE_AS_STRNCMP
194 lea -0xff0(%ecx), %edx
200 movdqu (%esi,%edx), %xmm2
201 movdqu (%edi,%edx), %xmm1
202 pcmpistri $0x1a, %xmm2, %xmm1
205 #ifdef USE_AS_STRNCMP
213 movzbl (%edi,%edx), %eax
214 movzbl (%esi,%edx), %ebx
219 #ifdef USE_AS_STRNCMP
233 #ifdef USE_AS_STRNCMP
237 lea (%ecx,%edx), %ebx
238 movzbl (%edi,%ebx), %eax
239 movzbl (%esi,%ebx), %ecx
245 #ifdef USE_AS_STRNCMP
251 #ifdef USE_AS_STRNCMP
270 add $0xfefefeff, %ecx
277 #ifdef USE_AS_STRNCMP
284 add $0xfefefeff, %ecx
291 #ifdef USE_AS_STRNCMP
306 #ifdef USE_AS_STRNCMP
316 #ifdef USE_AS_STRNCMP
327 #ifdef USE_AS_STRNCMP
338 #ifdef USE_AS_STRNCMP
349 #ifdef USE_AS_STRNCMP
359 #ifdef USE_AS_STRNCMP
369 #ifdef USE_AS_STRNCMP