x86: In ld.so, diagnose missing APX support in APX-only builds
[glibc.git] / sysdeps / x86_64 / memmove.S
blob66e04d408f24257aaaab963ec2b6419c18208e8b
1 /* Optimized memmove for x86-64.
2    Copyright (C) 2016-2024 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/>.  */
20 #ifdef USE_MULTIARCH
21 # if !IS_IN (libc)
22 #  define MEMCPY_SYMBOL(p,s)            memcpy
23 # endif
24 #else
25 # if defined SHARED && IS_IN (libc)
26 #  define MEMCPY_SYMBOL(p,s)            __memcpy
27 # else
28 #  define MEMCPY_SYMBOL(p,s)            memcpy
29 # endif
30 #endif
31 #if !defined USE_MULTIARCH || !IS_IN (libc)
32 # define MEMPCPY_SYMBOL(p,s)            __mempcpy
33 #endif
35 #define MEMMOVE_CHK_SYMBOL(p,s) p
36 #define MEMMOVE_SYMBOL(p,s)     memmove
39 #define DEFAULT_IMPL_V1 "multiarch/memmove-sse2-unaligned-erms.S"
40 #define DEFAULT_IMPL_V3 "multiarch/memmove-avx-unaligned-erms.S"
41 #define DEFAULT_IMPL_V4 "multiarch/memmove-evex-unaligned-erms.S"
43 #include "isa-default-impl.h"
45 weak_alias (__mempcpy, mempcpy)
47 #ifndef USE_MULTIARCH
48 libc_hidden_builtin_def (memmove)
49 libc_hidden_builtin_def (__memmove_chk)
50 libc_hidden_builtin_def (__memcpy_chk)
51 libc_hidden_builtin_def (__mempcpy_chk)
52 # if defined SHARED && IS_IN (libc)
53 strong_alias (memmove, __memcpy)
54 libc_hidden_ver (memmove, memcpy)
55 # endif
56 libc_hidden_def (__mempcpy)
57 weak_alias (__mempcpy, mempcpy)
58 libc_hidden_builtin_def (mempcpy)
61 # if defined SHARED && IS_IN (libc)
62 #  undef memcpy
63 #  include <shlib-compat.h>
64 versioned_symbol (libc, __memcpy, memcpy, GLIBC_2_14);
65 # endif
66 #endif