1 /* Multiple versions of memcpy
2 All versions must be listed in ifunc-impl-list.c.
3 Copyright (C) 2013-2015 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
20 /* Thumb requires excess IT instructions here. */
23 #include <rtld-global-offsets.h>
26 /* Under __ARM_NEON__, memcpy_neon.S defines the name memcpy. */
30 .type memcpy, %gnu_indirect_function
33 tst r0, #HWCAP_ARM_VFP
34 ldrne r1, .Lmemcpy_vfp
38 tst r0, #HWCAP_ARM_NEON
39 ldrne r1, .Lmemcpy_neon
46 .long C_SYMBOL_NAME(__memcpy_arm) - 1b - PC_OFS
49 .long C_SYMBOL_NAME(__memcpy_neon) - 1b - PC_OFS
51 .long C_SYMBOL_NAME(__memcpy_vfp) - 1b - PC_OFS
55 libc_hidden_builtin_def (memcpy)
56 #endif /* Not __ARM_NEON__. */
58 /* These versions of memcpy are defined not to clobber any VFP or NEON
59 registers so they must always call the ARM variant of the memcpy code. */
60 strong_alias (__memcpy_arm, __aeabi_memcpy)
61 strong_alias (__memcpy_arm, __aeabi_memcpy4)
62 strong_alias (__memcpy_arm, __aeabi_memcpy8)
63 libc_hidden_def (__memcpy_arm)
65 #undef libc_hidden_builtin_def
66 #define libc_hidden_builtin_def(name)
68 #define weak_alias(x, y)
69 #undef libc_hidden_def
70 #define libc_hidden_def(name)
72 #define memcpy __memcpy_arm
76 #include "memcpy_impl.S"