]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/s390/ifunc-memcpy.h
0e701968c8f39014754f2d4620f1bc2b5ec1c4f2
[thirdparty/glibc.git] / sysdeps / s390 / ifunc-memcpy.h
1 /* memcpy variant information on S/390 version.
2 Copyright (C) 2018 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 <http://www.gnu.org/licenses/>. */
18
19 #if defined SHARED && defined USE_MULTIARCH && IS_IN (libc) \
20 && ! defined HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT
21 # define HAVE_MEMCPY_IFUNC 1
22 #else
23 # define HAVE_MEMCPY_IFUNC 0
24 #endif
25
26 #if defined HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT
27 # define MEMCPY_DEFAULT MEMCPY_Z196
28 # define MEMPCPY_DEFAULT MEMPCPY_Z196
29 # define HAVE_MEMCPY_Z900_G5 0
30 # define HAVE_MEMCPY_Z10 0
31 # define HAVE_MEMCPY_Z196 1
32 #elif defined HAVE_S390_MIN_Z10_ZARCH_ASM_SUPPORT
33 # define MEMCPY_DEFAULT MEMCPY_Z10
34 # define MEMPCPY_DEFAULT MEMPCPY_Z10
35 # define HAVE_MEMCPY_Z900_G5 0
36 # define HAVE_MEMCPY_Z10 1
37 # define HAVE_MEMCPY_Z196 HAVE_MEMCPY_IFUNC
38 #else
39 # define MEMCPY_DEFAULT MEMCPY_Z900_G5
40 # define MEMPCPY_DEFAULT MEMPCPY_Z900_G5
41 # define HAVE_MEMCPY_Z900_G5 1
42 # define HAVE_MEMCPY_Z10 HAVE_MEMCPY_IFUNC
43 # define HAVE_MEMCPY_Z196 HAVE_MEMCPY_IFUNC
44 #endif
45
46 #if defined SHARED && defined USE_MULTIARCH && IS_IN (libc) \
47 && ! defined HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT
48 # define HAVE_MEMMOVE_IFUNC 1
49 #else
50 # define HAVE_MEMMOVE_IFUNC 0
51 #endif
52
53 #ifdef HAVE_S390_VX_ASM_SUPPORT
54 # define HAVE_MEMMOVE_IFUNC_AND_VX_SUPPORT HAVE_MEMMOVE_IFUNC
55 #else
56 # define HAVE_MEMMOVE_IFUNC_AND_VX_SUPPORT 0
57 #endif
58
59 #if defined HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT
60 # define MEMMOVE_DEFAULT MEMMOVE_Z13
61 # define HAVE_MEMMOVE_C 0
62 # define HAVE_MEMMOVE_Z13 1
63 #else
64 # define MEMMOVE_DEFAULT MEMMOVE_C
65 # define HAVE_MEMMOVE_C 1
66 # define HAVE_MEMMOVE_Z13 HAVE_MEMMOVE_IFUNC_AND_VX_SUPPORT
67 #endif
68
69 #if HAVE_MEMCPY_Z900_G5
70 # define MEMCPY_Z900_G5 __memcpy_default
71 # define MEMPCPY_Z900_G5 __mempcpy_default
72 #else
73 # define MEMCPY_Z900_G5 NULL
74 # define MEMPCPY_Z900_G5 NULL
75 #endif
76
77 #if HAVE_MEMCPY_Z10
78 # define MEMCPY_Z10 __memcpy_z10
79 # define MEMPCPY_Z10 __mempcpy_z10
80 #else
81 # define MEMCPY_Z10 NULL
82 # define MEMPCPY_Z10 NULL
83 #endif
84
85 #if HAVE_MEMCPY_Z196
86 # define MEMCPY_Z196 __memcpy_z196
87 # define MEMPCPY_Z196 __mempcpy_z196
88 #else
89 # define MEMCPY_Z196 NULL
90 # define MEMPCPY_Z196 NULL
91 #endif
92
93 #if HAVE_MEMMOVE_C
94 # define MEMMOVE_C __memmove_c
95 #else
96 # define MEMMOVE_C NULL
97 #endif
98
99 #if HAVE_MEMMOVE_Z13
100 # define MEMMOVE_Z13 __memmove_z13
101 #else
102 # define MEMMOVE_Z13 NULL
103 #endif