1 /* Enumerate available IFUNC implementations of a function. sparc 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/>. */
24 #include <ifunc-impl-list.h>
26 /* Fill ARRAY of MAX elements with IFUNC implementations for function
27 NAME and return the number of valid entries. */
30 __libc_ifunc_impl_list (const char *name
, struct libc_ifunc_impl
*array
,
36 hwcap
= GLRO(dl_hwcap
);
38 IFUNC_IMPL (i
, name
, memcpy
,
39 IFUNC_IMPL_ADD (array
, i
, memcpy
, hwcap
& HWCAP_SPARC_CRYPTO
,
41 IFUNC_IMPL_ADD (array
, i
, memcpy
, hwcap
& HWCAP_SPARC_N2
,
43 IFUNC_IMPL_ADD (array
, i
, memcpy
, hwcap
& HWCAP_SPARC_BLKINIT
,
45 IFUNC_IMPL_ADD (array
, i
, memcpy
, hwcap
& HWCAP_SPARC_ULTRA3
,
47 IFUNC_IMPL_ADD (array
, i
, memcpy
, 1, __memcpy_ultra1
));
49 IFUNC_IMPL (i
, name
, mempcpy
,
50 IFUNC_IMPL_ADD (array
, i
, mempcpy
, hwcap
& HWCAP_SPARC_CRYPTO
,
52 IFUNC_IMPL_ADD (array
, i
, mempcpy
, hwcap
& HWCAP_SPARC_N2
,
54 IFUNC_IMPL_ADD (array
, i
, mempcpy
, hwcap
& HWCAP_SPARC_BLKINIT
,
56 IFUNC_IMPL_ADD (array
, i
, mempcpy
, hwcap
& HWCAP_SPARC_ULTRA3
,
58 IFUNC_IMPL_ADD (array
, i
, mempcpy
, 1, __mempcpy_ultra1
));
60 IFUNC_IMPL (i
, name
, bzero
,
61 IFUNC_IMPL_ADD (array
, i
, bzero
, hwcap
& HWCAP_SPARC_CRYPTO
,
63 IFUNC_IMPL_ADD (array
, i
, bzero
, hwcap
& HWCAP_SPARC_BLKINIT
,
65 IFUNC_IMPL_ADD (array
, i
, bzero
, 1, __bzero_ultra1
));
67 IFUNC_IMPL (i
, name
, memset
,
68 IFUNC_IMPL_ADD (array
, i
, memset
, hwcap
& HWCAP_SPARC_CRYPTO
,
70 IFUNC_IMPL_ADD (array
, i
, memset
, hwcap
& HWCAP_SPARC_BLKINIT
,
72 IFUNC_IMPL_ADD (array
, i
, memset
, 1, __memset_ultra1
));