1 /* Enumerate available IFUNC implementations of a function. i686 version.
2 Copyright (C) 2012 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
22 #include <ifunc-impl-list.h>
23 #include "init-arch.h"
25 /* Maximum number of IFUNC implementations. */
28 /* Fill ARRAY of MAX elements with IFUNC implementations for function
29 NAME and return the number of valid entries. */
32 __libc_ifunc_impl_list (const char *name
, struct libc_ifunc_impl
*array
,
35 assert (max
>= MAX_IFUNC
);
39 /* Support sysdeps/i386/i686/multiarch/bcopy.S. */
40 IFUNC_IMPL (i
, name
, bcopy
,
41 IFUNC_IMPL_ADD (array
, i
, bcopy
, HAS_SSSE3
,
43 IFUNC_IMPL_ADD (array
, i
, bcopy
, HAS_SSSE3
, __bcopy_ssse3
)
44 IFUNC_IMPL_ADD (array
, i
, bcopy
, 1, __bcopy_ia32
))
46 /* Support sysdeps/i386/i686/multiarch/bzero.S. */
47 IFUNC_IMPL (i
, name
, bzero
,
48 IFUNC_IMPL_ADD (array
, i
, bzero
, HAS_SSE2
, __bzero_sse2_rep
)
49 IFUNC_IMPL_ADD (array
, i
, bzero
, HAS_SSE2
, __bzero_sse2
)
50 IFUNC_IMPL_ADD (array
, i
, bzero
, 1, __bzero_ia32
))
52 /* Support sysdeps/i386/i686/multiarch/memchr.S. */
53 IFUNC_IMPL (i
, name
, memchr
,
54 IFUNC_IMPL_ADD (array
, i
, memchr
, HAS_SSE2
,
56 IFUNC_IMPL_ADD (array
, i
, memchr
, HAS_SSE2
, __memchr_sse2
)
57 IFUNC_IMPL_ADD (array
, i
, memchr
, 1, __memchr_ia32
))
59 /* Support sysdeps/i386/i686/multiarch/memcmp.S. */
60 IFUNC_IMPL (i
, name
, memcmp
,
61 IFUNC_IMPL_ADD (array
, i
, memcmp
, HAS_SSE4_2
,
63 IFUNC_IMPL_ADD (array
, i
, memcmp
, HAS_SSSE3
, __memcmp_ssse3
)
64 IFUNC_IMPL_ADD (array
, i
, memcmp
, 1, __memcmp_ia32
))
66 /* Support sysdeps/i386/i686/multiarch/memmove_chk.S. */
67 IFUNC_IMPL (i
, name
, __memmove_chk
,
68 IFUNC_IMPL_ADD (array
, i
, __memmove_chk
, HAS_SSSE3
,
69 __memmove_chk_ssse3_rep
)
70 IFUNC_IMPL_ADD (array
, i
, __memmove_chk
, HAS_SSSE3
,
72 IFUNC_IMPL_ADD (array
, i
, __memmove_chk
, 1,
75 /* Support sysdeps/i386/i686/multiarch/memmove.S. */
76 IFUNC_IMPL (i
, name
, memmove
,
77 IFUNC_IMPL_ADD (array
, i
, memmove
, HAS_SSSE3
,
79 IFUNC_IMPL_ADD (array
, i
, memmove
, HAS_SSSE3
,
81 IFUNC_IMPL_ADD (array
, i
, memmove
, 1, __memmove_ia32
))
83 /* Support sysdeps/i386/i686/multiarch/memrchr.S. */
84 IFUNC_IMPL (i
, name
, memrchr
,
85 IFUNC_IMPL_ADD (array
, i
, memrchr
, HAS_SSE2
,
87 IFUNC_IMPL_ADD (array
, i
, memrchr
, HAS_SSE2
, __memrchr_sse2
)
88 IFUNC_IMPL_ADD (array
, i
, memrchr
, 1, __memrchr_ia32
))
90 /* Support sysdeps/i386/i686/multiarch/memset_chk.S. */
91 IFUNC_IMPL (i
, name
, __memset_chk
,
92 IFUNC_IMPL_ADD (array
, i
, __memset_chk
, HAS_SSE2
,
93 __memset_chk_sse2_rep
)
94 IFUNC_IMPL_ADD (array
, i
, __memset_chk
, HAS_SSE2
,
96 IFUNC_IMPL_ADD (array
, i
, __memset_chk
, 1,
99 /* Support sysdeps/i386/i686/multiarch/memset.S. */
100 IFUNC_IMPL (i
, name
, memset
,
101 IFUNC_IMPL_ADD (array
, i
, memset
, HAS_SSE2
,
103 IFUNC_IMPL_ADD (array
, i
, memset
, HAS_SSE2
, __memset_sse2
)
104 IFUNC_IMPL_ADD (array
, i
, memset
, 1, __memset_ia32
))
106 /* Support sysdeps/i386/i686/multiarch/rawmemchr.S. */
107 IFUNC_IMPL (i
, name
, rawmemchr
,
108 IFUNC_IMPL_ADD (array
, i
, rawmemchr
, HAS_SSE2
,
109 __rawmemchr_sse2_bsf
)
110 IFUNC_IMPL_ADD (array
, i
, rawmemchr
, HAS_SSE2
,
112 IFUNC_IMPL_ADD (array
, i
, rawmemchr
, 1, __rawmemchr_ia32
))
114 /* Support sysdeps/i386/i686/multiarch/stpncpy.S. */
115 IFUNC_IMPL (i
, name
, stpncpy
,
116 IFUNC_IMPL_ADD (array
, i
, stpncpy
, HAS_SSSE3
,
118 IFUNC_IMPL_ADD (array
, i
, stpncpy
, HAS_SSE2
, __stpncpy_sse2
)
119 IFUNC_IMPL_ADD (array
, i
, stpncpy
, 1, __stpncpy_ia32
))
121 /* Support sysdeps/i386/i686/multiarch/stpcpy.S. */
122 IFUNC_IMPL (i
, name
, stpcpy
,
123 IFUNC_IMPL_ADD (array
, i
, stpcpy
, HAS_SSSE3
, __stpcpy_ssse3
)
124 IFUNC_IMPL_ADD (array
, i
, stpcpy
, HAS_SSE2
, __stpcpy_sse2
)
125 IFUNC_IMPL_ADD (array
, i
, stpcpy
, 1, __stpcpy_ia32
))
127 /* Support sysdeps/i386/i686/multiarch/strcasecmp.S. */
128 IFUNC_IMPL (i
, name
, strcasecmp
,
129 IFUNC_IMPL_ADD (array
, i
, strcasecmp
, HAS_SSE4_2
,
131 IFUNC_IMPL_ADD (array
, i
, strcasecmp
, HAS_SSSE3
,
133 IFUNC_IMPL_ADD (array
, i
, strcasecmp
, 1, __strcasecmp_ia32
))
135 /* Support sysdeps/i386/i686/multiarch/strcasecmp_l.S. */
136 IFUNC_IMPL (i
, name
, strcasecmp_l
,
137 IFUNC_IMPL_ADD (array
, i
, strcasecmp_l
, HAS_SSE4_2
,
138 __strcasecmp_l_sse4_2
)
139 IFUNC_IMPL_ADD (array
, i
, strcasecmp_l
, HAS_SSSE3
,
140 __strcasecmp_l_ssse3
)
141 IFUNC_IMPL_ADD (array
, i
, strcasecmp_l
, 1,
142 __strcasecmp_l_ia32
))
144 /* Support sysdeps/i386/i686/multiarch/strcasestr.c. */
145 IFUNC_IMPL (i
, name
, strcasestr
,
146 IFUNC_IMPL_ADD (array
, i
, strcasestr
, HAS_SSE4_2
,
148 IFUNC_IMPL_ADD (array
, i
, strcasestr
, 1, __strcasestr_ia32
))
150 /* Support sysdeps/i386/i686/multiarch/strcat.S. */
151 IFUNC_IMPL (i
, name
, strcat
,
152 IFUNC_IMPL_ADD (array
, i
, strcat
, HAS_SSSE3
, __strcat_ssse3
)
153 IFUNC_IMPL_ADD (array
, i
, strcat
, HAS_SSE2
, __strcat_sse2
)
154 IFUNC_IMPL_ADD (array
, i
, strcat
, 1, __strcat_ia32
))
156 /* Support sysdeps/i386/i686/multiarch/strchr.S. */
157 IFUNC_IMPL (i
, name
, strchr
,
158 IFUNC_IMPL_ADD (array
, i
, strchr
, HAS_SSE2
,
160 IFUNC_IMPL_ADD (array
, i
, strchr
, HAS_SSE2
, __strchr_sse2
)
161 IFUNC_IMPL_ADD (array
, i
, strchr
, 1, __strchr_ia32
))
163 /* Support sysdeps/i386/i686/multiarch/strcmp.S. */
164 IFUNC_IMPL (i
, name
, strcmp
,
165 IFUNC_IMPL_ADD (array
, i
, strcmp
, HAS_SSE4_2
,
167 IFUNC_IMPL_ADD (array
, i
, strcmp
, HAS_SSSE3
, __strcmp_ssse3
)
168 IFUNC_IMPL_ADD (array
, i
, strcmp
, 1, __strcmp_ia32
))
170 /* Support sysdeps/i386/i686/multiarch/strcpy.S. */
171 IFUNC_IMPL (i
, name
, strcpy
,
172 IFUNC_IMPL_ADD (array
, i
, strcpy
, HAS_SSSE3
, __strcpy_ssse3
)
173 IFUNC_IMPL_ADD (array
, i
, strcpy
, HAS_SSE2
, __strcpy_sse2
)
174 IFUNC_IMPL_ADD (array
, i
, strcpy
, 1, __strcpy_ia32
))
176 /* Support sysdeps/i386/i686/multiarch/strcspn.S. */
177 IFUNC_IMPL (i
, name
, strcspn
,
178 IFUNC_IMPL_ADD (array
, i
, strcspn
, HAS_SSE4_2
,
180 IFUNC_IMPL_ADD (array
, i
, strcspn
, 1, __strcspn_ia32
))
182 /* Support sysdeps/i386/i686/multiarch/strncase.S. */
183 IFUNC_IMPL (i
, name
, strncasecmp
,
184 IFUNC_IMPL_ADD (array
, i
, strncasecmp
, HAS_SSE4_2
,
185 __strncasecmp_sse4_2
)
186 IFUNC_IMPL_ADD (array
, i
, strncasecmp
, HAS_SSSE3
,
188 IFUNC_IMPL_ADD (array
, i
, strncasecmp
, 1,
191 /* Support sysdeps/i386/i686/multiarch/strncase_l.S. */
192 IFUNC_IMPL (i
, name
, strncasecmp_l
,
193 IFUNC_IMPL_ADD (array
, i
, strncasecmp_l
,
194 HAS_SSE4_2
, __strncasecmp_l_sse4_2
)
195 IFUNC_IMPL_ADD (array
, i
, strncasecmp_l
,
196 HAS_SSSE3
, __strncasecmp_l_ssse3
)
197 IFUNC_IMPL_ADD (array
, i
, strncasecmp_l
, 1,
198 __strncasecmp_l_ia32
))
200 /* Support sysdeps/i386/i686/multiarch/strncat.S. */
201 IFUNC_IMPL (i
, name
, strncat
,
202 IFUNC_IMPL_ADD (array
, i
, strncat
, HAS_SSSE3
,
204 IFUNC_IMPL_ADD (array
, i
, strncat
, HAS_SSE2
, __strncat_sse2
)
205 IFUNC_IMPL_ADD (array
, i
, strncat
, 1, __strncat_ia32
))
207 /* Support sysdeps/i386/i686/multiarch/strncpy.S. */
208 IFUNC_IMPL (i
, name
, strncpy
,
209 IFUNC_IMPL_ADD (array
, i
, strncpy
, HAS_SSSE3
,
211 IFUNC_IMPL_ADD (array
, i
, strncpy
, HAS_SSE2
, __strncpy_sse2
)
212 IFUNC_IMPL_ADD (array
, i
, strncpy
, 1, __strncpy_ia32
))
214 /* Support sysdeps/i386/i686/multiarch/strnlen.S. */
215 IFUNC_IMPL (i
, name
, strnlen
,
216 IFUNC_IMPL_ADD (array
, i
, strnlen
, HAS_SSE2
, __strnlen_sse2
)
217 IFUNC_IMPL_ADD (array
, i
, strnlen
, 1, __strnlen_ia32
))
219 /* Support sysdeps/i386/i686/multiarch/strpbrk.S. */
220 IFUNC_IMPL (i
, name
, strpbrk
,
221 IFUNC_IMPL_ADD (array
, i
, strpbrk
, HAS_SSE4_2
,
223 IFUNC_IMPL_ADD (array
, i
, strpbrk
, 1, __strpbrk_ia32
))
225 /* Support sysdeps/i386/i686/multiarch/strrchr.S. */
226 IFUNC_IMPL (i
, name
, strrchr
,
227 IFUNC_IMPL_ADD (array
, i
, strrchr
, HAS_SSE2
,
229 IFUNC_IMPL_ADD (array
, i
, strrchr
, HAS_SSE2
, __strrchr_sse2
)
230 IFUNC_IMPL_ADD (array
, i
, strrchr
, 1, __strrchr_ia32
))
232 /* Support sysdeps/i386/i686/multiarch/strspn.S. */
233 IFUNC_IMPL (i
, name
, strspn
,
234 IFUNC_IMPL_ADD (array
, i
, strspn
, HAS_SSE4_2
, __strspn_sse42
)
235 IFUNC_IMPL_ADD (array
, i
, strspn
, 1, __strspn_ia32
))
237 /* Support sysdeps/i386/i686/multiarch/strstr-c.c. */
238 IFUNC_IMPL (i
, name
, strstr
,
239 IFUNC_IMPL_ADD (array
, i
, strstr
, HAS_SSE4_2
, __strstr_sse42
)
240 IFUNC_IMPL_ADD (array
, i
, strstr
, 1, __strstr_ia32
))
242 /* Support sysdeps/i386/i686/multiarch/wcschr.S. */
243 IFUNC_IMPL (i
, name
, wcschr
,
244 IFUNC_IMPL_ADD (array
, i
, wcschr
, HAS_SSE2
, __wcschr_sse2
)
245 IFUNC_IMPL_ADD (array
, i
, wcschr
, 1, __wcschr_ia32
))
247 /* Support sysdeps/i386/i686/multiarch/wcscmp.S. */
248 IFUNC_IMPL (i
, name
, wcscmp
,
249 IFUNC_IMPL_ADD (array
, i
, wcscmp
, HAS_SSE2
, __wcscmp_sse2
)
250 IFUNC_IMPL_ADD (array
, i
, wcscmp
, 1, __wcscmp_ia32
))
252 /* Support sysdeps/i386/i686/multiarch/wcscpy.S. */
253 IFUNC_IMPL (i
, name
, wcscpy
,
254 IFUNC_IMPL_ADD (array
, i
, wcscpy
, HAS_SSSE3
, __wcscpy_ssse3
)
255 IFUNC_IMPL_ADD (array
, i
, wcscpy
, 1, __wcscpy_ia32
))
257 /* Support sysdeps/i386/i686/multiarch/wcslen.S. */
258 IFUNC_IMPL (i
, name
, wcslen
,
259 IFUNC_IMPL_ADD (array
, i
, wcslen
, HAS_SSE2
, __wcslen_sse2
)
260 IFUNC_IMPL_ADD (array
, i
, wcslen
, 1, __wcslen_ia32
))
262 /* Support sysdeps/i386/i686/multiarch/wcsrchr.S. */
263 IFUNC_IMPL (i
, name
, wcsrchr
,
264 IFUNC_IMPL_ADD (array
, i
, wcsrchr
, HAS_SSE2
, __wcsrchr_sse2
)
265 IFUNC_IMPL_ADD (array
, i
, wcsrchr
, 1, __wcsrchr_ia32
))
267 /* Support sysdeps/i386/i686/multiarch/wmemcmp.S. */
268 IFUNC_IMPL (i
, name
, wmemcmp
,
269 IFUNC_IMPL_ADD (array
, i
, wmemcmp
, HAS_SSE4_2
,
271 IFUNC_IMPL_ADD (array
, i
, wmemcmp
, HAS_SSSE3
,
273 IFUNC_IMPL_ADD (array
, i
, wmemcmp
, 1, __wmemcmp_ia32
))
276 /* Support sysdeps/i386/i686/multiarch/memcpy_chk.S. */
277 IFUNC_IMPL (i
, name
, __memcpy_chk
,
278 IFUNC_IMPL_ADD (array
, i
, __memcpy_chk
, HAS_SSSE3
,
279 __memcpy_chk_ssse3_rep
)
280 IFUNC_IMPL_ADD (array
, i
, __memcpy_chk
, HAS_SSSE3
,
282 IFUNC_IMPL_ADD (array
, i
, __memcpy_chk
, 1,
285 /* Support sysdeps/i386/i686/multiarch/memcpy.S. */
286 IFUNC_IMPL (i
, name
, memcpy
,
287 IFUNC_IMPL_ADD (array
, i
, memcpy
, HAS_SSSE3
,
289 IFUNC_IMPL_ADD (array
, i
, memcpy
, HAS_SSSE3
, __memcpy_ssse3
)
290 IFUNC_IMPL_ADD (array
, i
, memcpy
, 1, __memcpy_ia32
))
292 /* Support sysdeps/i386/i686/multiarch/mempcpy_chk.S. */
293 IFUNC_IMPL (i
, name
, __mempcpy_chk
,
294 IFUNC_IMPL_ADD (array
, i
, __mempcpy_chk
, HAS_SSSE3
,
295 __mempcpy_chk_ssse3_rep
)
296 IFUNC_IMPL_ADD (array
, i
, __mempcpy_chk
, HAS_SSSE3
,
298 IFUNC_IMPL_ADD (array
, i
, __mempcpy_chk
, 1,
301 /* Support sysdeps/i386/i686/multiarch/mempcpy.S. */
302 IFUNC_IMPL (i
, name
, mempcpy
,
303 IFUNC_IMPL_ADD (array
, i
, mempcpy
, HAS_SSSE3
,
305 IFUNC_IMPL_ADD (array
, i
, mempcpy
, HAS_SSSE3
,
307 IFUNC_IMPL_ADD (array
, i
, mempcpy
, 1, __mempcpy_ia32
))
309 /* Support sysdeps/i386/i686/multiarch/strlen.S. */
310 IFUNC_IMPL (i
, name
, strlen
,
311 IFUNC_IMPL_ADD (array
, i
, strlen
, HAS_SSE2
,
313 IFUNC_IMPL_ADD (array
, i
, strlen
, HAS_SSE2
, __strlen_sse2
)
314 IFUNC_IMPL_ADD (array
, i
, strlen
, 1, __strlen_ia32
))
316 /* Support sysdeps/i386/i686/multiarch/strncmp.S. */
317 IFUNC_IMPL (i
, name
, strncmp
,
318 IFUNC_IMPL_ADD (array
, i
, strncmp
, HAS_SSE4_2
,
320 IFUNC_IMPL_ADD (array
, i
, strncmp
, HAS_SSSE3
,
322 IFUNC_IMPL_ADD (array
, i
, strncmp
, 1, __strncmp_ia32
))