1 /* Enumerate available IFUNC implementations of a function. i686 version.
2 Copyright (C) 2012-2014 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/strcat.S. */
145 IFUNC_IMPL (i
, name
, strcat
,
146 IFUNC_IMPL_ADD (array
, i
, strcat
, HAS_SSSE3
, __strcat_ssse3
)
147 IFUNC_IMPL_ADD (array
, i
, strcat
, HAS_SSE2
, __strcat_sse2
)
148 IFUNC_IMPL_ADD (array
, i
, strcat
, 1, __strcat_ia32
))
150 /* Support sysdeps/i386/i686/multiarch/strchr.S. */
151 IFUNC_IMPL (i
, name
, strchr
,
152 IFUNC_IMPL_ADD (array
, i
, strchr
, HAS_SSE2
,
154 IFUNC_IMPL_ADD (array
, i
, strchr
, HAS_SSE2
, __strchr_sse2
)
155 IFUNC_IMPL_ADD (array
, i
, strchr
, 1, __strchr_ia32
))
157 /* Support sysdeps/i386/i686/multiarch/strcmp.S. */
158 IFUNC_IMPL (i
, name
, strcmp
,
159 IFUNC_IMPL_ADD (array
, i
, strcmp
, HAS_SSE4_2
,
161 IFUNC_IMPL_ADD (array
, i
, strcmp
, HAS_SSSE3
, __strcmp_ssse3
)
162 IFUNC_IMPL_ADD (array
, i
, strcmp
, 1, __strcmp_ia32
))
164 /* Support sysdeps/i386/i686/multiarch/strcpy.S. */
165 IFUNC_IMPL (i
, name
, strcpy
,
166 IFUNC_IMPL_ADD (array
, i
, strcpy
, HAS_SSSE3
, __strcpy_ssse3
)
167 IFUNC_IMPL_ADD (array
, i
, strcpy
, HAS_SSE2
, __strcpy_sse2
)
168 IFUNC_IMPL_ADD (array
, i
, strcpy
, 1, __strcpy_ia32
))
170 /* Support sysdeps/i386/i686/multiarch/strcspn.S. */
171 IFUNC_IMPL (i
, name
, strcspn
,
172 IFUNC_IMPL_ADD (array
, i
, strcspn
, HAS_SSE4_2
,
174 IFUNC_IMPL_ADD (array
, i
, strcspn
, 1, __strcspn_ia32
))
176 /* Support sysdeps/i386/i686/multiarch/strncase.S. */
177 IFUNC_IMPL (i
, name
, strncasecmp
,
178 IFUNC_IMPL_ADD (array
, i
, strncasecmp
, HAS_SSE4_2
,
179 __strncasecmp_sse4_2
)
180 IFUNC_IMPL_ADD (array
, i
, strncasecmp
, HAS_SSSE3
,
182 IFUNC_IMPL_ADD (array
, i
, strncasecmp
, 1,
185 /* Support sysdeps/i386/i686/multiarch/strncase_l.S. */
186 IFUNC_IMPL (i
, name
, strncasecmp_l
,
187 IFUNC_IMPL_ADD (array
, i
, strncasecmp_l
,
188 HAS_SSE4_2
, __strncasecmp_l_sse4_2
)
189 IFUNC_IMPL_ADD (array
, i
, strncasecmp_l
,
190 HAS_SSSE3
, __strncasecmp_l_ssse3
)
191 IFUNC_IMPL_ADD (array
, i
, strncasecmp_l
, 1,
192 __strncasecmp_l_ia32
))
194 /* Support sysdeps/i386/i686/multiarch/strncat.S. */
195 IFUNC_IMPL (i
, name
, strncat
,
196 IFUNC_IMPL_ADD (array
, i
, strncat
, HAS_SSSE3
,
198 IFUNC_IMPL_ADD (array
, i
, strncat
, HAS_SSE2
, __strncat_sse2
)
199 IFUNC_IMPL_ADD (array
, i
, strncat
, 1, __strncat_ia32
))
201 /* Support sysdeps/i386/i686/multiarch/strncpy.S. */
202 IFUNC_IMPL (i
, name
, strncpy
,
203 IFUNC_IMPL_ADD (array
, i
, strncpy
, HAS_SSSE3
,
205 IFUNC_IMPL_ADD (array
, i
, strncpy
, HAS_SSE2
, __strncpy_sse2
)
206 IFUNC_IMPL_ADD (array
, i
, strncpy
, 1, __strncpy_ia32
))
208 /* Support sysdeps/i386/i686/multiarch/strnlen.S. */
209 IFUNC_IMPL (i
, name
, strnlen
,
210 IFUNC_IMPL_ADD (array
, i
, strnlen
, HAS_SSE2
, __strnlen_sse2
)
211 IFUNC_IMPL_ADD (array
, i
, strnlen
, 1, __strnlen_ia32
))
213 /* Support sysdeps/i386/i686/multiarch/strpbrk.S. */
214 IFUNC_IMPL (i
, name
, strpbrk
,
215 IFUNC_IMPL_ADD (array
, i
, strpbrk
, HAS_SSE4_2
,
217 IFUNC_IMPL_ADD (array
, i
, strpbrk
, 1, __strpbrk_ia32
))
219 /* Support sysdeps/i386/i686/multiarch/strrchr.S. */
220 IFUNC_IMPL (i
, name
, strrchr
,
221 IFUNC_IMPL_ADD (array
, i
, strrchr
, HAS_SSE2
,
223 IFUNC_IMPL_ADD (array
, i
, strrchr
, HAS_SSE2
, __strrchr_sse2
)
224 IFUNC_IMPL_ADD (array
, i
, strrchr
, 1, __strrchr_ia32
))
226 /* Support sysdeps/i386/i686/multiarch/strspn.S. */
227 IFUNC_IMPL (i
, name
, strspn
,
228 IFUNC_IMPL_ADD (array
, i
, strspn
, HAS_SSE4_2
, __strspn_sse42
)
229 IFUNC_IMPL_ADD (array
, i
, strspn
, 1, __strspn_ia32
))
231 /* Support sysdeps/i386/i686/multiarch/wcschr.S. */
232 IFUNC_IMPL (i
, name
, wcschr
,
233 IFUNC_IMPL_ADD (array
, i
, wcschr
, HAS_SSE2
, __wcschr_sse2
)
234 IFUNC_IMPL_ADD (array
, i
, wcschr
, 1, __wcschr_ia32
))
236 /* Support sysdeps/i386/i686/multiarch/wcscmp.S. */
237 IFUNC_IMPL (i
, name
, wcscmp
,
238 IFUNC_IMPL_ADD (array
, i
, wcscmp
, HAS_SSE2
, __wcscmp_sse2
)
239 IFUNC_IMPL_ADD (array
, i
, wcscmp
, 1, __wcscmp_ia32
))
241 /* Support sysdeps/i386/i686/multiarch/wcscpy.S. */
242 IFUNC_IMPL (i
, name
, wcscpy
,
243 IFUNC_IMPL_ADD (array
, i
, wcscpy
, HAS_SSSE3
, __wcscpy_ssse3
)
244 IFUNC_IMPL_ADD (array
, i
, wcscpy
, 1, __wcscpy_ia32
))
246 /* Support sysdeps/i386/i686/multiarch/wcslen.S. */
247 IFUNC_IMPL (i
, name
, wcslen
,
248 IFUNC_IMPL_ADD (array
, i
, wcslen
, HAS_SSE2
, __wcslen_sse2
)
249 IFUNC_IMPL_ADD (array
, i
, wcslen
, 1, __wcslen_ia32
))
251 /* Support sysdeps/i386/i686/multiarch/wcsrchr.S. */
252 IFUNC_IMPL (i
, name
, wcsrchr
,
253 IFUNC_IMPL_ADD (array
, i
, wcsrchr
, HAS_SSE2
, __wcsrchr_sse2
)
254 IFUNC_IMPL_ADD (array
, i
, wcsrchr
, 1, __wcsrchr_ia32
))
256 /* Support sysdeps/i386/i686/multiarch/wmemcmp.S. */
257 IFUNC_IMPL (i
, name
, wmemcmp
,
258 IFUNC_IMPL_ADD (array
, i
, wmemcmp
, HAS_SSE4_2
,
260 IFUNC_IMPL_ADD (array
, i
, wmemcmp
, HAS_SSSE3
,
262 IFUNC_IMPL_ADD (array
, i
, wmemcmp
, 1, __wmemcmp_ia32
))
265 /* Support sysdeps/i386/i686/multiarch/memcpy_chk.S. */
266 IFUNC_IMPL (i
, name
, __memcpy_chk
,
267 IFUNC_IMPL_ADD (array
, i
, __memcpy_chk
, HAS_SSSE3
,
268 __memcpy_chk_ssse3_rep
)
269 IFUNC_IMPL_ADD (array
, i
, __memcpy_chk
, HAS_SSSE3
,
271 IFUNC_IMPL_ADD (array
, i
, __memcpy_chk
, 1,
274 /* Support sysdeps/i386/i686/multiarch/memcpy.S. */
275 IFUNC_IMPL (i
, name
, memcpy
,
276 IFUNC_IMPL_ADD (array
, i
, memcpy
, HAS_SSSE3
,
278 IFUNC_IMPL_ADD (array
, i
, memcpy
, HAS_SSSE3
, __memcpy_ssse3
)
279 IFUNC_IMPL_ADD (array
, i
, memcpy
, 1, __memcpy_ia32
))
281 /* Support sysdeps/i386/i686/multiarch/mempcpy_chk.S. */
282 IFUNC_IMPL (i
, name
, __mempcpy_chk
,
283 IFUNC_IMPL_ADD (array
, i
, __mempcpy_chk
, HAS_SSSE3
,
284 __mempcpy_chk_ssse3_rep
)
285 IFUNC_IMPL_ADD (array
, i
, __mempcpy_chk
, HAS_SSSE3
,
287 IFUNC_IMPL_ADD (array
, i
, __mempcpy_chk
, 1,
290 /* Support sysdeps/i386/i686/multiarch/mempcpy.S. */
291 IFUNC_IMPL (i
, name
, mempcpy
,
292 IFUNC_IMPL_ADD (array
, i
, mempcpy
, HAS_SSSE3
,
294 IFUNC_IMPL_ADD (array
, i
, mempcpy
, HAS_SSSE3
,
296 IFUNC_IMPL_ADD (array
, i
, mempcpy
, 1, __mempcpy_ia32
))
298 /* Support sysdeps/i386/i686/multiarch/strlen.S. */
299 IFUNC_IMPL (i
, name
, strlen
,
300 IFUNC_IMPL_ADD (array
, i
, strlen
, HAS_SSE2
,
302 IFUNC_IMPL_ADD (array
, i
, strlen
, HAS_SSE2
, __strlen_sse2
)
303 IFUNC_IMPL_ADD (array
, i
, strlen
, 1, __strlen_ia32
))
305 /* Support sysdeps/i386/i686/multiarch/strncmp.S. */
306 IFUNC_IMPL (i
, name
, strncmp
,
307 IFUNC_IMPL_ADD (array
, i
, strncmp
, HAS_SSE4_2
,
309 IFUNC_IMPL_ADD (array
, i
, strncmp
, HAS_SSSE3
,
311 IFUNC_IMPL_ADD (array
, i
, strncmp
, 1, __strncmp_ia32
))