1 /* Enumerate available IFUNC implementations of a function. AARCH64 version.
2 Copyright (C) 2017-2022 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/>. */
23 #include <ifunc-impl-list.h>
24 #include <init-arch.h>
27 /* Maximum number of IFUNC implementations. */
31 __libc_ifunc_impl_list (const char *name
, struct libc_ifunc_impl
*array
,
34 assert (max
>= MAX_IFUNC
);
40 /* Support sysdeps/aarch64/multiarch/memcpy.c, memmove.c and memset.c. */
41 IFUNC_IMPL (i
, name
, memcpy
,
42 IFUNC_IMPL_ADD (array
, i
, memcpy
, 1, __memcpy_thunderx
)
43 IFUNC_IMPL_ADD (array
, i
, memcpy
, !bti
, __memcpy_thunderx2
)
44 IFUNC_IMPL_ADD (array
, i
, memcpy
, 1, __memcpy_falkor
)
45 IFUNC_IMPL_ADD (array
, i
, memcpy
, 1, __memcpy_simd
)
46 #if HAVE_AARCH64_SVE_ASM
47 IFUNC_IMPL_ADD (array
, i
, memcpy
, sve
, __memcpy_a64fx
)
48 IFUNC_IMPL_ADD (array
, i
, memcpy
, sve
, __memcpy_sve
)
50 IFUNC_IMPL_ADD (array
, i
, memcpy
, 1, __memcpy_generic
))
51 IFUNC_IMPL (i
, name
, memmove
,
52 IFUNC_IMPL_ADD (array
, i
, memmove
, 1, __memmove_thunderx
)
53 IFUNC_IMPL_ADD (array
, i
, memmove
, !bti
, __memmove_thunderx2
)
54 IFUNC_IMPL_ADD (array
, i
, memmove
, 1, __memmove_falkor
)
55 IFUNC_IMPL_ADD (array
, i
, memmove
, 1, __memmove_simd
)
56 #if HAVE_AARCH64_SVE_ASM
57 IFUNC_IMPL_ADD (array
, i
, memmove
, sve
, __memmove_a64fx
)
58 IFUNC_IMPL_ADD (array
, i
, memmove
, sve
, __memmove_sve
)
60 IFUNC_IMPL_ADD (array
, i
, memmove
, 1, __memmove_generic
))
61 IFUNC_IMPL (i
, name
, memset
,
62 /* Enable this on non-falkor processors too so that other cores
63 can do a comparative analysis with __memset_generic. */
64 IFUNC_IMPL_ADD (array
, i
, memset
, (zva_size
== 64), __memset_falkor
)
65 IFUNC_IMPL_ADD (array
, i
, memset
, (zva_size
== 64), __memset_emag
)
66 IFUNC_IMPL_ADD (array
, i
, memset
, 1, __memset_kunpeng
)
67 #if HAVE_AARCH64_SVE_ASM
68 IFUNC_IMPL_ADD (array
, i
, memset
, sve
, __memset_a64fx
)
70 IFUNC_IMPL_ADD (array
, i
, memset
, 1, __memset_generic
))
71 IFUNC_IMPL (i
, name
, memchr
,
72 IFUNC_IMPL_ADD (array
, i
, memchr
, !mte
, __memchr_nosimd
)
73 IFUNC_IMPL_ADD (array
, i
, memchr
, 1, __memchr_generic
))
75 IFUNC_IMPL (i
, name
, strlen
,
76 IFUNC_IMPL_ADD (array
, i
, strlen
, !mte
, __strlen_asimd
)
77 IFUNC_IMPL_ADD (array
, i
, strlen
, 1, __strlen_mte
))