1 /* Enumerate available IFUNC implementations of a function. i686 version.
2 Copyright (C) 2012-2015 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
, HAS_SSE2
,
45 __bcopy_sse2_unaligned
)
46 IFUNC_IMPL_ADD (array
, i
, bcopy
, 1, __bcopy_ia32
))
48 /* Support sysdeps/i386/i686/multiarch/bzero.S. */
49 IFUNC_IMPL (i
, name
, bzero
,
50 IFUNC_IMPL_ADD (array
, i
, bzero
, HAS_SSE2
, __bzero_sse2_rep
)
51 IFUNC_IMPL_ADD (array
, i
, bzero
, HAS_SSE2
, __bzero_sse2
)
52 IFUNC_IMPL_ADD (array
, i
, bzero
, 1, __bzero_ia32
))
54 /* Support sysdeps/i386/i686/multiarch/memchr.S. */
55 IFUNC_IMPL (i
, name
, memchr
,
56 IFUNC_IMPL_ADD (array
, i
, memchr
, HAS_SSE2
,
58 IFUNC_IMPL_ADD (array
, i
, memchr
, HAS_SSE2
, __memchr_sse2
)
59 IFUNC_IMPL_ADD (array
, i
, memchr
, 1, __memchr_ia32
))
61 /* Support sysdeps/i386/i686/multiarch/memcmp.S. */
62 IFUNC_IMPL (i
, name
, memcmp
,
63 IFUNC_IMPL_ADD (array
, i
, memcmp
, HAS_SSE4_2
,
65 IFUNC_IMPL_ADD (array
, i
, memcmp
, HAS_SSSE3
, __memcmp_ssse3
)
66 IFUNC_IMPL_ADD (array
, i
, memcmp
, 1, __memcmp_ia32
))
68 /* Support sysdeps/i386/i686/multiarch/memmove_chk.S. */
69 IFUNC_IMPL (i
, name
, __memmove_chk
,
70 IFUNC_IMPL_ADD (array
, i
, __memmove_chk
, HAS_SSSE3
,
71 __memmove_chk_ssse3_rep
)
72 IFUNC_IMPL_ADD (array
, i
, __memmove_chk
, HAS_SSSE3
,
74 IFUNC_IMPL_ADD (array
, i
, __memmove_chk
, HAS_SSE2
,
75 __memmove_chk_sse2_unaligned
)
76 IFUNC_IMPL_ADD (array
, i
, __memmove_chk
, 1,
79 /* Support sysdeps/i386/i686/multiarch/memmove.S. */
80 IFUNC_IMPL (i
, name
, memmove
,
81 IFUNC_IMPL_ADD (array
, i
, memmove
, HAS_SSSE3
,
83 IFUNC_IMPL_ADD (array
, i
, memmove
, HAS_SSSE3
,
85 IFUNC_IMPL_ADD (array
, i
, memmove
, HAS_SSE2
,
86 __memmove_sse2_unaligned
)
87 IFUNC_IMPL_ADD (array
, i
, memmove
, 1, __memmove_ia32
))
89 /* Support sysdeps/i386/i686/multiarch/memrchr.S. */
90 IFUNC_IMPL (i
, name
, memrchr
,
91 IFUNC_IMPL_ADD (array
, i
, memrchr
, HAS_SSE2
,
93 IFUNC_IMPL_ADD (array
, i
, memrchr
, HAS_SSE2
, __memrchr_sse2
)
94 IFUNC_IMPL_ADD (array
, i
, memrchr
, 1, __memrchr_ia32
))
96 /* Support sysdeps/i386/i686/multiarch/memset_chk.S. */
97 IFUNC_IMPL (i
, name
, __memset_chk
,
98 IFUNC_IMPL_ADD (array
, i
, __memset_chk
, HAS_SSE2
,
99 __memset_chk_sse2_rep
)
100 IFUNC_IMPL_ADD (array
, i
, __memset_chk
, HAS_SSE2
,
102 IFUNC_IMPL_ADD (array
, i
, __memset_chk
, 1,
105 /* Support sysdeps/i386/i686/multiarch/memset.S. */
106 IFUNC_IMPL (i
, name
, memset
,
107 IFUNC_IMPL_ADD (array
, i
, memset
, HAS_SSE2
,
109 IFUNC_IMPL_ADD (array
, i
, memset
, HAS_SSE2
, __memset_sse2
)
110 IFUNC_IMPL_ADD (array
, i
, memset
, 1, __memset_ia32
))
112 /* Support sysdeps/i386/i686/multiarch/rawmemchr.S. */
113 IFUNC_IMPL (i
, name
, rawmemchr
,
114 IFUNC_IMPL_ADD (array
, i
, rawmemchr
, HAS_SSE2
,
115 __rawmemchr_sse2_bsf
)
116 IFUNC_IMPL_ADD (array
, i
, rawmemchr
, HAS_SSE2
,
118 IFUNC_IMPL_ADD (array
, i
, rawmemchr
, 1, __rawmemchr_ia32
))
120 /* Support sysdeps/i386/i686/multiarch/stpncpy.S. */
121 IFUNC_IMPL (i
, name
, stpncpy
,
122 IFUNC_IMPL_ADD (array
, i
, stpncpy
, HAS_SSSE3
,
124 IFUNC_IMPL_ADD (array
, i
, stpncpy
, HAS_SSE2
, __stpncpy_sse2
)
125 IFUNC_IMPL_ADD (array
, i
, stpncpy
, 1, __stpncpy_ia32
))
127 /* Support sysdeps/i386/i686/multiarch/stpcpy.S. */
128 IFUNC_IMPL (i
, name
, stpcpy
,
129 IFUNC_IMPL_ADD (array
, i
, stpcpy
, HAS_SSSE3
, __stpcpy_ssse3
)
130 IFUNC_IMPL_ADD (array
, i
, stpcpy
, HAS_SSE2
, __stpcpy_sse2
)
131 IFUNC_IMPL_ADD (array
, i
, stpcpy
, 1, __stpcpy_ia32
))
133 /* Support sysdeps/i386/i686/multiarch/strcasecmp.S. */
134 IFUNC_IMPL (i
, name
, strcasecmp
,
135 IFUNC_IMPL_ADD (array
, i
, strcasecmp
, HAS_SSE4_2
,
137 IFUNC_IMPL_ADD (array
, i
, strcasecmp
, HAS_SSSE3
,
139 IFUNC_IMPL_ADD (array
, i
, strcasecmp
, 1, __strcasecmp_ia32
))
141 /* Support sysdeps/i386/i686/multiarch/strcasecmp_l.S. */
142 IFUNC_IMPL (i
, name
, strcasecmp_l
,
143 IFUNC_IMPL_ADD (array
, i
, strcasecmp_l
, HAS_SSE4_2
,
144 __strcasecmp_l_sse4_2
)
145 IFUNC_IMPL_ADD (array
, i
, strcasecmp_l
, HAS_SSSE3
,
146 __strcasecmp_l_ssse3
)
147 IFUNC_IMPL_ADD (array
, i
, strcasecmp_l
, 1,
148 __strcasecmp_l_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/wcschr.S. */
238 IFUNC_IMPL (i
, name
, wcschr
,
239 IFUNC_IMPL_ADD (array
, i
, wcschr
, HAS_SSE2
, __wcschr_sse2
)
240 IFUNC_IMPL_ADD (array
, i
, wcschr
, 1, __wcschr_ia32
))
242 /* Support sysdeps/i386/i686/multiarch/wcscmp.S. */
243 IFUNC_IMPL (i
, name
, wcscmp
,
244 IFUNC_IMPL_ADD (array
, i
, wcscmp
, HAS_SSE2
, __wcscmp_sse2
)
245 IFUNC_IMPL_ADD (array
, i
, wcscmp
, 1, __wcscmp_ia32
))
247 /* Support sysdeps/i386/i686/multiarch/wcscpy.S. */
248 IFUNC_IMPL (i
, name
, wcscpy
,
249 IFUNC_IMPL_ADD (array
, i
, wcscpy
, HAS_SSSE3
, __wcscpy_ssse3
)
250 IFUNC_IMPL_ADD (array
, i
, wcscpy
, 1, __wcscpy_ia32
))
252 /* Support sysdeps/i386/i686/multiarch/wcslen.S. */
253 IFUNC_IMPL (i
, name
, wcslen
,
254 IFUNC_IMPL_ADD (array
, i
, wcslen
, HAS_SSE2
, __wcslen_sse2
)
255 IFUNC_IMPL_ADD (array
, i
, wcslen
, 1, __wcslen_ia32
))
257 /* Support sysdeps/i386/i686/multiarch/wcsrchr.S. */
258 IFUNC_IMPL (i
, name
, wcsrchr
,
259 IFUNC_IMPL_ADD (array
, i
, wcsrchr
, HAS_SSE2
, __wcsrchr_sse2
)
260 IFUNC_IMPL_ADD (array
, i
, wcsrchr
, 1, __wcsrchr_ia32
))
262 /* Support sysdeps/i386/i686/multiarch/wmemcmp.S. */
263 IFUNC_IMPL (i
, name
, wmemcmp
,
264 IFUNC_IMPL_ADD (array
, i
, wmemcmp
, HAS_SSE4_2
,
266 IFUNC_IMPL_ADD (array
, i
, wmemcmp
, HAS_SSSE3
,
268 IFUNC_IMPL_ADD (array
, i
, wmemcmp
, 1, __wmemcmp_ia32
))
271 /* Support sysdeps/i386/i686/multiarch/memcpy_chk.S. */
272 IFUNC_IMPL (i
, name
, __memcpy_chk
,
273 IFUNC_IMPL_ADD (array
, i
, __memcpy_chk
, HAS_SSSE3
,
274 __memcpy_chk_ssse3_rep
)
275 IFUNC_IMPL_ADD (array
, i
, __memcpy_chk
, HAS_SSSE3
,
277 IFUNC_IMPL_ADD (array
, i
, __memcpy_chk
, HAS_SSE2
,
278 __memcpy_chk_sse2_unaligned
)
279 IFUNC_IMPL_ADD (array
, i
, __memcpy_chk
, 1,
282 /* Support sysdeps/i386/i686/multiarch/memcpy.S. */
283 IFUNC_IMPL (i
, name
, memcpy
,
284 IFUNC_IMPL_ADD (array
, i
, memcpy
, HAS_SSSE3
,
286 IFUNC_IMPL_ADD (array
, i
, memcpy
, HAS_SSSE3
, __memcpy_ssse3
)
287 IFUNC_IMPL_ADD (array
, i
, memcpy
, HAS_SSE2
,
288 __memcpy_sse2_unaligned
)
289 IFUNC_IMPL_ADD (array
, i
, memcpy
, 1, __memcpy_ia32
))
291 /* Support sysdeps/i386/i686/multiarch/mempcpy_chk.S. */
292 IFUNC_IMPL (i
, name
, __mempcpy_chk
,
293 IFUNC_IMPL_ADD (array
, i
, __mempcpy_chk
, HAS_SSSE3
,
294 __mempcpy_chk_ssse3_rep
)
295 IFUNC_IMPL_ADD (array
, i
, __mempcpy_chk
, HAS_SSSE3
,
297 IFUNC_IMPL_ADD (array
, i
, __mempcpy_chk
, HAS_SSE2
,
298 __mempcpy_chk_sse2_unaligned
)
299 IFUNC_IMPL_ADD (array
, i
, __mempcpy_chk
, 1,
302 /* Support sysdeps/i386/i686/multiarch/mempcpy.S. */
303 IFUNC_IMPL (i
, name
, mempcpy
,
304 IFUNC_IMPL_ADD (array
, i
, mempcpy
, HAS_SSSE3
,
306 IFUNC_IMPL_ADD (array
, i
, mempcpy
, HAS_SSSE3
,
308 IFUNC_IMPL_ADD (array
, i
, mempcpy
, HAS_SSE2
,
309 __mempcpy_sse2_unaligned
)
310 IFUNC_IMPL_ADD (array
, i
, mempcpy
, 1, __mempcpy_ia32
))
312 /* Support sysdeps/i386/i686/multiarch/strlen.S. */
313 IFUNC_IMPL (i
, name
, strlen
,
314 IFUNC_IMPL_ADD (array
, i
, strlen
, HAS_SSE2
,
316 IFUNC_IMPL_ADD (array
, i
, strlen
, HAS_SSE2
, __strlen_sse2
)
317 IFUNC_IMPL_ADD (array
, i
, strlen
, 1, __strlen_ia32
))
319 /* Support sysdeps/i386/i686/multiarch/strncmp.S. */
320 IFUNC_IMPL (i
, name
, strncmp
,
321 IFUNC_IMPL_ADD (array
, i
, strncmp
, HAS_SSE4_2
,
323 IFUNC_IMPL_ADD (array
, i
, strncmp
, HAS_SSSE3
,
325 IFUNC_IMPL_ADD (array
, i
, strncmp
, 1, __strncmp_ia32
))