1 /* Optimized memmove for x86-64.
2 Copyright (C) 2016 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/>. */
23 #define PREFETCHNT prefetchnta
24 #define VMOVNT movntdq
25 /* Use movups and movaps for smaller code sizes. */
32 # if !defined SHARED || !IS_IN (libc)
33 # define MEMCPY_SYMBOL(p,s) memcpy
36 # if defined SHARED && IS_IN (libc)
37 # define MEMCPY_SYMBOL(p,s) __memcpy
39 # define MEMCPY_SYMBOL(p,s) memcpy
42 #if !defined SHARED || !defined USE_MULTIARCH || !IS_IN (libc)
43 # define MEMPCPY_SYMBOL(p,s) __mempcpy
45 #ifndef MEMMOVE_SYMBOL
46 # define MEMMOVE_CHK_SYMBOL(p,s) p
47 # define MEMMOVE_SYMBOL(p,s) memmove
50 #include "multiarch/memmove-vec-unaligned-erms.S"
53 libc_hidden_builtin_def (memmove)
54 # if defined SHARED && IS_IN (libc)
55 strong_alias (memmove, __memcpy)
56 libc_hidden_ver (memmove, memcpy)
58 libc_hidden_def (__mempcpy)
59 weak_alias (__mempcpy, mempcpy)
60 libc_hidden_builtin_def (mempcpy)
62 # if defined SHARED && IS_IN (libc)
64 # include <shlib-compat.h>
65 versioned_symbol (libc, __memcpy, memcpy, GLIBC_2_14);
67 # if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_14)
68 compat_symbol (libc, memmove, memcpy, GLIBC_2_2_5);