1 /* Enumerate available IFUNC implementations of a function. i686 version.
2 Copyright (C) 2012-2020 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 <https://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
, CPU_FEATURE_USABLE (SSSE3
),
43 IFUNC_IMPL_ADD (array
, i
, bcopy
, CPU_FEATURE_USABLE (SSSE3
),
45 IFUNC_IMPL_ADD (array
, i
, bcopy
, CPU_FEATURE_USABLE (SSE2
),
46 __bcopy_sse2_unaligned
)
47 IFUNC_IMPL_ADD (array
, i
, bcopy
, 1, __bcopy_ia32
))
49 /* Support sysdeps/i386/i686/multiarch/bzero.S. */
50 IFUNC_IMPL (i
, name
, bzero
,
51 IFUNC_IMPL_ADD (array
, i
, bzero
, CPU_FEATURE_USABLE (SSE2
),
53 IFUNC_IMPL_ADD (array
, i
, bzero
, CPU_FEATURE_USABLE (SSE2
),
55 IFUNC_IMPL_ADD (array
, i
, bzero
, 1, __bzero_ia32
))
57 /* Support sysdeps/i386/i686/multiarch/memchr.S. */
58 IFUNC_IMPL (i
, name
, memchr
,
59 IFUNC_IMPL_ADD (array
, i
, memchr
, CPU_FEATURE_USABLE (SSE2
),
61 IFUNC_IMPL_ADD (array
, i
, memchr
, CPU_FEATURE_USABLE (SSE2
),
63 IFUNC_IMPL_ADD (array
, i
, memchr
, 1, __memchr_ia32
))
65 /* Support sysdeps/i386/i686/multiarch/memcmp.S. */
66 IFUNC_IMPL (i
, name
, memcmp
,
67 IFUNC_IMPL_ADD (array
, i
, memcmp
, CPU_FEATURE_USABLE (SSE4_2
),
69 IFUNC_IMPL_ADD (array
, i
, memcmp
, CPU_FEATURE_USABLE (SSSE3
),
71 IFUNC_IMPL_ADD (array
, i
, memcmp
, 1, __memcmp_ia32
))
74 /* Support sysdeps/i386/i686/multiarch/memmove_chk.S. */
75 IFUNC_IMPL (i
, name
, __memmove_chk
,
76 IFUNC_IMPL_ADD (array
, i
, __memmove_chk
,
77 CPU_FEATURE_USABLE (SSSE3
),
78 __memmove_chk_ssse3_rep
)
79 IFUNC_IMPL_ADD (array
, i
, __memmove_chk
,
80 CPU_FEATURE_USABLE (SSSE3
),
82 IFUNC_IMPL_ADD (array
, i
, __memmove_chk
,
83 CPU_FEATURE_USABLE (SSE2
),
84 __memmove_chk_sse2_unaligned
)
85 IFUNC_IMPL_ADD (array
, i
, __memmove_chk
, 1,
89 /* Support sysdeps/i386/i686/multiarch/memmove.S. */
90 IFUNC_IMPL (i
, name
, memmove
,
91 IFUNC_IMPL_ADD (array
, i
, memmove
, CPU_FEATURE_USABLE (SSSE3
),
93 IFUNC_IMPL_ADD (array
, i
, memmove
, CPU_FEATURE_USABLE (SSSE3
),
95 IFUNC_IMPL_ADD (array
, i
, memmove
, CPU_FEATURE_USABLE (SSE2
),
96 __memmove_sse2_unaligned
)
97 IFUNC_IMPL_ADD (array
, i
, memmove
, 1, __memmove_ia32
))
99 /* Support sysdeps/i386/i686/multiarch/memrchr.S. */
100 IFUNC_IMPL (i
, name
, memrchr
,
101 IFUNC_IMPL_ADD (array
, i
, memrchr
, CPU_FEATURE_USABLE (SSE2
),
103 IFUNC_IMPL_ADD (array
, i
, memrchr
, CPU_FEATURE_USABLE (SSE2
),
105 IFUNC_IMPL_ADD (array
, i
, memrchr
, 1, __memrchr_ia32
))
108 /* Support sysdeps/i386/i686/multiarch/memset_chk.S. */
109 IFUNC_IMPL (i
, name
, __memset_chk
,
110 IFUNC_IMPL_ADD (array
, i
, __memset_chk
,
111 CPU_FEATURE_USABLE (SSE2
),
112 __memset_chk_sse2_rep
)
113 IFUNC_IMPL_ADD (array
, i
, __memset_chk
,
114 CPU_FEATURE_USABLE (SSE2
),
116 IFUNC_IMPL_ADD (array
, i
, __memset_chk
, 1,
120 /* Support sysdeps/i386/i686/multiarch/memset.S. */
121 IFUNC_IMPL (i
, name
, memset
,
122 IFUNC_IMPL_ADD (array
, i
, memset
, CPU_FEATURE_USABLE (SSE2
),
124 IFUNC_IMPL_ADD (array
, i
, memset
, CPU_FEATURE_USABLE (SSE2
),
126 IFUNC_IMPL_ADD (array
, i
, memset
, 1, __memset_ia32
))
128 /* Support sysdeps/i386/i686/multiarch/rawmemchr.S. */
129 IFUNC_IMPL (i
, name
, rawmemchr
,
130 IFUNC_IMPL_ADD (array
, i
, rawmemchr
, CPU_FEATURE_USABLE (SSE2
),
131 __rawmemchr_sse2_bsf
)
132 IFUNC_IMPL_ADD (array
, i
, rawmemchr
, CPU_FEATURE_USABLE (SSE2
),
134 IFUNC_IMPL_ADD (array
, i
, rawmemchr
, 1, __rawmemchr_ia32
))
136 /* Support sysdeps/i386/i686/multiarch/stpncpy.S. */
137 IFUNC_IMPL (i
, name
, stpncpy
,
138 IFUNC_IMPL_ADD (array
, i
, stpncpy
, CPU_FEATURE_USABLE (SSSE3
),
140 IFUNC_IMPL_ADD (array
, i
, stpncpy
, CPU_FEATURE_USABLE (SSE2
),
142 IFUNC_IMPL_ADD (array
, i
, stpncpy
, 1, __stpncpy_ia32
))
144 /* Support sysdeps/i386/i686/multiarch/stpcpy.S. */
145 IFUNC_IMPL (i
, name
, stpcpy
,
146 IFUNC_IMPL_ADD (array
, i
, stpcpy
, CPU_FEATURE_USABLE (SSSE3
),
148 IFUNC_IMPL_ADD (array
, i
, stpcpy
, CPU_FEATURE_USABLE (SSE2
),
150 IFUNC_IMPL_ADD (array
, i
, stpcpy
, 1, __stpcpy_ia32
))
152 /* Support sysdeps/i386/i686/multiarch/strcasecmp.S. */
153 IFUNC_IMPL (i
, name
, strcasecmp
,
154 IFUNC_IMPL_ADD (array
, i
, strcasecmp
,
155 CPU_FEATURE_USABLE (SSE4_2
),
157 IFUNC_IMPL_ADD (array
, i
, strcasecmp
,
158 CPU_FEATURE_USABLE (SSSE3
),
160 IFUNC_IMPL_ADD (array
, i
, strcasecmp
, 1, __strcasecmp_ia32
))
162 /* Support sysdeps/i386/i686/multiarch/strcasecmp_l.S. */
163 IFUNC_IMPL (i
, name
, strcasecmp_l
,
164 IFUNC_IMPL_ADD (array
, i
, strcasecmp_l
,
165 CPU_FEATURE_USABLE (SSE4_2
),
166 __strcasecmp_l_sse4_2
)
167 IFUNC_IMPL_ADD (array
, i
, strcasecmp_l
,
168 CPU_FEATURE_USABLE (SSSE3
),
169 __strcasecmp_l_ssse3
)
170 IFUNC_IMPL_ADD (array
, i
, strcasecmp_l
, 1,
171 __strcasecmp_l_ia32
))
173 /* Support sysdeps/i386/i686/multiarch/strcat.S. */
174 IFUNC_IMPL (i
, name
, strcat
,
175 IFUNC_IMPL_ADD (array
, i
, strcat
, CPU_FEATURE_USABLE (SSSE3
),
177 IFUNC_IMPL_ADD (array
, i
, strcat
, CPU_FEATURE_USABLE (SSE2
),
179 IFUNC_IMPL_ADD (array
, i
, strcat
, 1, __strcat_ia32
))
181 /* Support sysdeps/i386/i686/multiarch/strchr.S. */
182 IFUNC_IMPL (i
, name
, strchr
,
183 IFUNC_IMPL_ADD (array
, i
, strchr
, CPU_FEATURE_USABLE (SSE2
),
185 IFUNC_IMPL_ADD (array
, i
, strchr
, CPU_FEATURE_USABLE (SSE2
),
187 IFUNC_IMPL_ADD (array
, i
, strchr
, 1, __strchr_ia32
))
189 /* Support sysdeps/i386/i686/multiarch/strcmp.S. */
190 IFUNC_IMPL (i
, name
, strcmp
,
191 IFUNC_IMPL_ADD (array
, i
, strcmp
, CPU_FEATURE_USABLE (SSE4_2
),
193 IFUNC_IMPL_ADD (array
, i
, strcmp
, CPU_FEATURE_USABLE (SSSE3
),
195 IFUNC_IMPL_ADD (array
, i
, strcmp
, 1, __strcmp_ia32
))
197 /* Support sysdeps/i386/i686/multiarch/strcpy.S. */
198 IFUNC_IMPL (i
, name
, strcpy
,
199 IFUNC_IMPL_ADD (array
, i
, strcpy
, CPU_FEATURE_USABLE (SSSE3
),
201 IFUNC_IMPL_ADD (array
, i
, strcpy
, CPU_FEATURE_USABLE (SSE2
),
203 IFUNC_IMPL_ADD (array
, i
, strcpy
, 1, __strcpy_ia32
))
205 /* Support sysdeps/i386/i686/multiarch/strcspn.S. */
206 IFUNC_IMPL (i
, name
, strcspn
,
207 IFUNC_IMPL_ADD (array
, i
, strcspn
, CPU_FEATURE_USABLE (SSE4_2
),
209 IFUNC_IMPL_ADD (array
, i
, strcspn
, 1, __strcspn_ia32
))
211 /* Support sysdeps/i386/i686/multiarch/strncase.S. */
212 IFUNC_IMPL (i
, name
, strncasecmp
,
213 IFUNC_IMPL_ADD (array
, i
, strncasecmp
,
214 CPU_FEATURE_USABLE (SSE4_2
),
215 __strncasecmp_sse4_2
)
216 IFUNC_IMPL_ADD (array
, i
, strncasecmp
,
217 CPU_FEATURE_USABLE (SSSE3
),
219 IFUNC_IMPL_ADD (array
, i
, strncasecmp
, 1,
222 /* Support sysdeps/i386/i686/multiarch/strncase_l.S. */
223 IFUNC_IMPL (i
, name
, strncasecmp_l
,
224 IFUNC_IMPL_ADD (array
, i
, strncasecmp_l
,
225 CPU_FEATURE_USABLE (SSE4_2
),
226 __strncasecmp_l_sse4_2
)
227 IFUNC_IMPL_ADD (array
, i
, strncasecmp_l
,
228 CPU_FEATURE_USABLE (SSSE3
),
229 __strncasecmp_l_ssse3
)
230 IFUNC_IMPL_ADD (array
, i
, strncasecmp_l
, 1,
231 __strncasecmp_l_ia32
))
233 /* Support sysdeps/i386/i686/multiarch/strncat.S. */
234 IFUNC_IMPL (i
, name
, strncat
,
235 IFUNC_IMPL_ADD (array
, i
, strncat
, CPU_FEATURE_USABLE (SSSE3
),
237 IFUNC_IMPL_ADD (array
, i
, strncat
, CPU_FEATURE_USABLE (SSE2
),
239 IFUNC_IMPL_ADD (array
, i
, strncat
, 1, __strncat_ia32
))
241 /* Support sysdeps/i386/i686/multiarch/strncpy.S. */
242 IFUNC_IMPL (i
, name
, strncpy
,
243 IFUNC_IMPL_ADD (array
, i
, strncpy
, CPU_FEATURE_USABLE (SSSE3
),
245 IFUNC_IMPL_ADD (array
, i
, strncpy
, CPU_FEATURE_USABLE (SSE2
),
247 IFUNC_IMPL_ADD (array
, i
, strncpy
, 1, __strncpy_ia32
))
249 /* Support sysdeps/i386/i686/multiarch/strnlen.S. */
250 IFUNC_IMPL (i
, name
, strnlen
,
251 IFUNC_IMPL_ADD (array
, i
, strnlen
, CPU_FEATURE_USABLE (SSE2
),
253 IFUNC_IMPL_ADD (array
, i
, strnlen
, 1, __strnlen_ia32
))
255 /* Support sysdeps/i386/i686/multiarch/strpbrk.S. */
256 IFUNC_IMPL (i
, name
, strpbrk
,
257 IFUNC_IMPL_ADD (array
, i
, strpbrk
, CPU_FEATURE_USABLE (SSE4_2
),
259 IFUNC_IMPL_ADD (array
, i
, strpbrk
, 1, __strpbrk_ia32
))
261 /* Support sysdeps/i386/i686/multiarch/strrchr.S. */
262 IFUNC_IMPL (i
, name
, strrchr
,
263 IFUNC_IMPL_ADD (array
, i
, strrchr
, CPU_FEATURE_USABLE (SSE2
),
265 IFUNC_IMPL_ADD (array
, i
, strrchr
, CPU_FEATURE_USABLE (SSE2
),
267 IFUNC_IMPL_ADD (array
, i
, strrchr
, 1, __strrchr_ia32
))
269 /* Support sysdeps/i386/i686/multiarch/strspn.S. */
270 IFUNC_IMPL (i
, name
, strspn
,
271 IFUNC_IMPL_ADD (array
, i
, strspn
, CPU_FEATURE_USABLE (SSE4_2
),
273 IFUNC_IMPL_ADD (array
, i
, strspn
, 1, __strspn_ia32
))
275 /* Support sysdeps/i386/i686/multiarch/wcschr.S. */
276 IFUNC_IMPL (i
, name
, wcschr
,
277 IFUNC_IMPL_ADD (array
, i
, wcschr
, CPU_FEATURE_USABLE (SSE2
),
279 IFUNC_IMPL_ADD (array
, i
, wcschr
, 1, __wcschr_ia32
))
281 /* Support sysdeps/i386/i686/multiarch/wcscmp.S. */
282 IFUNC_IMPL (i
, name
, wcscmp
,
283 IFUNC_IMPL_ADD (array
, i
, wcscmp
, CPU_FEATURE_USABLE (SSE2
),
285 IFUNC_IMPL_ADD (array
, i
, wcscmp
, 1, __wcscmp_ia32
))
287 /* Support sysdeps/i386/i686/multiarch/wcscpy.S. */
288 IFUNC_IMPL (i
, name
, wcscpy
,
289 IFUNC_IMPL_ADD (array
, i
, wcscpy
, CPU_FEATURE_USABLE (SSSE3
),
291 IFUNC_IMPL_ADD (array
, i
, wcscpy
, 1, __wcscpy_ia32
))
293 /* Support sysdeps/i386/i686/multiarch/wcslen.S. */
294 IFUNC_IMPL (i
, name
, wcslen
,
295 IFUNC_IMPL_ADD (array
, i
, wcslen
, CPU_FEATURE_USABLE (SSE2
),
297 IFUNC_IMPL_ADD (array
, i
, wcslen
, 1, __wcslen_ia32
))
299 /* Support sysdeps/i386/i686/multiarch/wcsrchr.S. */
300 IFUNC_IMPL (i
, name
, wcsrchr
,
301 IFUNC_IMPL_ADD (array
, i
, wcsrchr
, CPU_FEATURE_USABLE (SSE2
),
303 IFUNC_IMPL_ADD (array
, i
, wcsrchr
, 1, __wcsrchr_ia32
))
305 /* Support sysdeps/i386/i686/multiarch/wmemcmp.S. */
306 IFUNC_IMPL (i
, name
, wmemcmp
,
307 IFUNC_IMPL_ADD (array
, i
, wmemcmp
, CPU_FEATURE_USABLE (SSE4_2
),
309 IFUNC_IMPL_ADD (array
, i
, wmemcmp
, CPU_FEATURE_USABLE (SSSE3
),
311 IFUNC_IMPL_ADD (array
, i
, wmemcmp
, 1, __wmemcmp_ia32
))
314 /* Support sysdeps/i386/i686/multiarch/memcpy_chk.S. */
315 IFUNC_IMPL (i
, name
, __memcpy_chk
,
316 IFUNC_IMPL_ADD (array
, i
, __memcpy_chk
,
317 CPU_FEATURE_USABLE (SSSE3
),
318 __memcpy_chk_ssse3_rep
)
319 IFUNC_IMPL_ADD (array
, i
, __memcpy_chk
,
320 CPU_FEATURE_USABLE (SSSE3
),
322 IFUNC_IMPL_ADD (array
, i
, __memcpy_chk
,
323 CPU_FEATURE_USABLE (SSE2
),
324 __memcpy_chk_sse2_unaligned
)
325 IFUNC_IMPL_ADD (array
, i
, __memcpy_chk
, 1,
328 /* Support sysdeps/i386/i686/multiarch/memcpy.S. */
329 IFUNC_IMPL (i
, name
, memcpy
,
330 IFUNC_IMPL_ADD (array
, i
, memcpy
, CPU_FEATURE_USABLE (SSSE3
),
332 IFUNC_IMPL_ADD (array
, i
, memcpy
, CPU_FEATURE_USABLE (SSSE3
),
334 IFUNC_IMPL_ADD (array
, i
, memcpy
, CPU_FEATURE_USABLE (SSE2
),
335 __memcpy_sse2_unaligned
)
336 IFUNC_IMPL_ADD (array
, i
, memcpy
, 1, __memcpy_ia32
))
338 /* Support sysdeps/i386/i686/multiarch/mempcpy_chk.S. */
339 IFUNC_IMPL (i
, name
, __mempcpy_chk
,
340 IFUNC_IMPL_ADD (array
, i
, __mempcpy_chk
,
341 CPU_FEATURE_USABLE (SSSE3
),
342 __mempcpy_chk_ssse3_rep
)
343 IFUNC_IMPL_ADD (array
, i
, __mempcpy_chk
,
344 CPU_FEATURE_USABLE (SSSE3
),
346 IFUNC_IMPL_ADD (array
, i
, __mempcpy_chk
,
347 CPU_FEATURE_USABLE (SSE2
),
348 __mempcpy_chk_sse2_unaligned
)
349 IFUNC_IMPL_ADD (array
, i
, __mempcpy_chk
, 1,
352 /* Support sysdeps/i386/i686/multiarch/mempcpy.S. */
353 IFUNC_IMPL (i
, name
, mempcpy
,
354 IFUNC_IMPL_ADD (array
, i
, mempcpy
, CPU_FEATURE_USABLE (SSSE3
),
356 IFUNC_IMPL_ADD (array
, i
, mempcpy
, CPU_FEATURE_USABLE (SSSE3
),
358 IFUNC_IMPL_ADD (array
, i
, mempcpy
, CPU_FEATURE_USABLE (SSE2
),
359 __mempcpy_sse2_unaligned
)
360 IFUNC_IMPL_ADD (array
, i
, mempcpy
, 1, __mempcpy_ia32
))
362 /* Support sysdeps/i386/i686/multiarch/strlen.S. */
363 IFUNC_IMPL (i
, name
, strlen
,
364 IFUNC_IMPL_ADD (array
, i
, strlen
, CPU_FEATURE_USABLE (SSE2
),
366 IFUNC_IMPL_ADD (array
, i
, strlen
, CPU_FEATURE_USABLE (SSE2
),
368 IFUNC_IMPL_ADD (array
, i
, strlen
, 1, __strlen_ia32
))
370 /* Support sysdeps/i386/i686/multiarch/strncmp.S. */
371 IFUNC_IMPL (i
, name
, strncmp
,
372 IFUNC_IMPL_ADD (array
, i
, strncmp
, CPU_FEATURE_USABLE (SSE4_2
),
374 IFUNC_IMPL_ADD (array
, i
, strncmp
, CPU_FEATURE_USABLE (SSSE3
),
376 IFUNC_IMPL_ADD (array
, i
, strncmp
, 1, __strncmp_ia32
))