1 /* Conversion between UTF-8 and UTF-32 - multiarch s390 version.
2 
3    Copyright (C) 2017-2021 Free Software Foundation, Inc.
4    This file is part of the GNU C Library.
5 
6    The GNU C Library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
10 
11    The GNU C Library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
15 
16    You should have received a copy of the GNU Lesser General Public
17    License along with the GNU C Library; if not, see
18    <https://www.gnu.org/licenses/>.  */
19 
20 #include <sysdeps/s390/utf8-utf32-z9.c>
21 #include <ifunc-resolve.h>
22 
23 #undef FROM_LOOP
24 #define FROM_LOOP	__from_utf8_loop
25 #undef TO_LOOP
26 #define TO_LOOP		__to_utf8_loop
27 
28 #define _SINGLE_NAME(NAME) NAME##_single
29 #define SINGLE_NAME(NAME) _SINGLE_NAME(NAME)
30 strong_alias (SINGLE_NAME (FROM_LOOP_DEFAULT), SINGLE_NAME (FROM_LOOP))
31 strong_alias (SINGLE_NAME (TO_LOOP_DEFAULT), SINGLE_NAME (TO_LOOP))
32 
33 /* Generate ifunc'ed loop functions for FROM/TO_LOOP.  */
34 s390_libc_ifunc_expr (FROM_LOOP_DEFAULT, FROM_LOOP,
35 		      (HAVE_FROM_VX && (hwcap & HWCAP_S390_VX))
36 		      ? FROM_LOOP_VX
37 		      : (HAVE_FROM_CU && (hwcap & HWCAP_S390_ZARCH
38 					  && hwcap & HWCAP_S390_HIGH_GPRS
39 					  && hwcap & HWCAP_S390_ETF3EH))
40 			? FROM_LOOP_CU
41 			: FROM_LOOP_DEFAULT);
42 
43 s390_libc_ifunc_expr (TO_LOOP_DEFAULT, TO_LOOP,
44 		      (HAVE_TO_VX_CU && (hwcap & HWCAP_S390_VXE))
45 		      ? TO_LOOP_VX_CU
46 		      : (HAVE_TO_VX && (hwcap & HWCAP_S390_VX))
47 			? TO_LOOP_VX
48 			: TO_LOOP_DEFAULT);
49 
50 #include <iconv/skeleton.c>
51