1/* A Generic Optimized memcpy implementation for AARCH64.
2 Copyright (C) 2017-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
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.
9
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.
14
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/>. */
18
19/* The actual memcpy and memmove code is in ../memcpy.S. If we are
20 building libc this file defines __memcpy_generic and __memmove_generic.
21 Otherwise the include of ../memcpy.S will define the normal __memcpy
22 and__memmove entry points. */
23
24#include <sysdep.h>
25
26#if IS_IN (libc)
27
28# define MEMCPY __memcpy_generic
29# define MEMMOVE __memmove_generic
30
31/* Do not hide the generic versions of memcpy and memmove, we use them
32 internally. */
33# undef libc_hidden_builtin_def
34# define libc_hidden_builtin_def(name)
35
36# ifdef SHARED
37/* It doesn't make sense to send libc-internal memcpy calls through a PLT. */
38 .globl __GI_memcpy; __GI_memcpy = __memcpy_generic
39 .globl __GI_memmove; __GI_memmove = __memmove_generic
40# endif
41
42#endif
43
44#include "../memcpy.S"
45

source code of glibc/sysdeps/aarch64/multiarch/memcpy_generic.S