]>
Commit | Line | Data |
---|---|---|
d2c4c403 | 1 | /* memmem variant information on S/390 version. |
2b778ceb | 2 | Copyright (C) 2018-2021 Free Software Foundation, Inc. |
d2c4c403 SL |
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 | |
5a82c748 | 17 | <https://www.gnu.org/licenses/>. */ |
d2c4c403 SL |
18 | |
19 | #if defined USE_MULTIARCH && IS_IN (libc) \ | |
421749d6 | 20 | && ! defined HAVE_S390_MIN_ARCH13_ZARCH_ASM_SUPPORT |
d2c4c403 SL |
21 | # define HAVE_MEMMEM_IFUNC 1 |
22 | #else | |
23 | # define HAVE_MEMMEM_IFUNC 0 | |
24 | #endif | |
25 | ||
26 | #ifdef HAVE_S390_VX_ASM_SUPPORT | |
27 | # define HAVE_MEMMEM_IFUNC_AND_VX_SUPPORT HAVE_MEMMEM_IFUNC | |
28 | #else | |
29 | # define HAVE_MEMMEM_IFUNC_AND_VX_SUPPORT 0 | |
30 | #endif | |
31 | ||
421749d6 SL |
32 | #ifdef HAVE_S390_ARCH13_ASM_SUPPORT |
33 | # define HAVE_MEMMEM_IFUNC_AND_ARCH13_SUPPORT HAVE_MEMMEM_IFUNC | |
34 | #else | |
35 | # define HAVE_MEMMEM_IFUNC_AND_ARCH13_SUPPORT 0 | |
36 | #endif | |
37 | ||
38 | #if defined HAVE_S390_MIN_ARCH13_ZARCH_ASM_SUPPORT | |
39 | # define MEMMEM_DEFAULT MEMMEM_ARCH13 | |
40 | # define HAVE_MEMMEM_C 0 | |
41 | # define HAVE_MEMMEM_Z13 1 | |
42 | # define MEMMEM_Z13_ONLY_USED_AS_FALLBACK 1 | |
43 | # define HAVE_MEMMEM_ARCH13 1 | |
44 | #elif defined HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT | |
d2c4c403 SL |
45 | # define MEMMEM_DEFAULT MEMMEM_Z13 |
46 | # define HAVE_MEMMEM_C 0 | |
47 | # define HAVE_MEMMEM_Z13 1 | |
421749d6 | 48 | # define HAVE_MEMMEM_ARCH13 HAVE_MEMMEM_IFUNC_AND_ARCH13_SUPPORT |
d2c4c403 SL |
49 | #else |
50 | # define MEMMEM_DEFAULT MEMMEM_C | |
51 | # define HAVE_MEMMEM_C 1 | |
52 | # define HAVE_MEMMEM_Z13 HAVE_MEMMEM_IFUNC_AND_VX_SUPPORT | |
421749d6 SL |
53 | # define HAVE_MEMMEM_ARCH13 HAVE_MEMMEM_IFUNC_AND_ARCH13_SUPPORT |
54 | #endif | |
55 | ||
56 | #ifndef MEMMEM_Z13_ONLY_USED_AS_FALLBACK | |
57 | # define MEMMEM_Z13_ONLY_USED_AS_FALLBACK 0 | |
d2c4c403 SL |
58 | #endif |
59 | ||
60 | #if HAVE_MEMMEM_C | |
61 | # define MEMMEM_C __memmem_c | |
62 | #else | |
63 | # define MEMMEM_C NULL | |
64 | #endif | |
65 | ||
66 | #if HAVE_MEMMEM_Z13 | |
67 | # define MEMMEM_Z13 __memmem_vx | |
68 | #else | |
69 | # define MEMMEM_Z13 NULL | |
70 | #endif | |
421749d6 SL |
71 | |
72 | #if HAVE_MEMMEM_ARCH13 | |
73 | # define MEMMEM_ARCH13 __memmem_arch13 | |
74 | #else | |
75 | # define MEMMEM_ARCH13 NULL | |
76 | #endif |