diff options
author | Stefan Liebler <stli@linux.vnet.ibm.com> | 2017-06-27 17:09:43 +0200 |
---|---|---|
committer | Stefan Liebler <stli@linux.vnet.ibm.com> | 2017-06-27 17:09:43 +0200 |
commit | a37b5daa6bc7fbcbbc229b2549a161fa15023f41 (patch) | |
tree | ac9580ba1158801b9c3d7979c41d59cf585eec26 /sysdeps/s390/multiarch/utf8-utf16-z9.c | |
parent | f0137ff31da85bc7d9bd4e621af958d8b7249475 (diff) | |
download | glibc-a37b5daa6bc7fbcbbc229b2549a161fa15023f41.tar glibc-a37b5daa6bc7fbcbbc229b2549a161fa15023f41.tar.gz glibc-a37b5daa6bc7fbcbbc229b2549a161fa15023f41.tar.bz2 glibc-a37b5daa6bc7fbcbbc229b2549a161fa15023f41.zip |
S390: Use cu21 instruction for converting from utf16 to utf8.
This patch adds an ifunc variant to use the cu instruction on arch12 CPUs.
This new ifunc variant can be built if binutils support z13 vector
instructions. At runtime, HWCAP_S390_VXE decides if we can use the
cu21 instruction.
ChangeLog:
* sysdeps/s390/utf8-utf16-z9.c (__to_utf8_loop_vx_cu):
Use vector and cu21 instruction.
* sysdeps/s390/multiarch/utf8-utf16-z9.c:
Add __to_utf8_loop_vx_cu in ifunc resolver.
Diffstat (limited to 'sysdeps/s390/multiarch/utf8-utf16-z9.c')
-rw-r--r-- | sysdeps/s390/multiarch/utf8-utf16-z9.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/s390/multiarch/utf8-utf16-z9.c b/sysdeps/s390/multiarch/utf8-utf16-z9.c index b55ef1aaec..1252281e4b 100644 --- a/sysdeps/s390/multiarch/utf8-utf16-z9.c +++ b/sysdeps/s390/multiarch/utf8-utf16-z9.c @@ -41,8 +41,10 @@ s390_libc_ifunc_expr (FROM_LOOP_DEFAULT, FROM_LOOP, : FROM_LOOP_DEFAULT); s390_libc_ifunc_expr (TO_LOOP_DEFAULT, TO_LOOP, - (HAVE_TO_VX && (hwcap & HWCAP_S390_VX)) - ? TO_LOOP_VX - : TO_LOOP_DEFAULT); + (HAVE_TO_VX_CU && (hwcap & HWCAP_S390_VXE)) + ? TO_LOOP_VX_CU + : (HAVE_TO_VX && (hwcap & HWCAP_S390_VX)) + ? TO_LOOP_VX + : TO_LOOP_DEFAULT); #include <iconv/skeleton.c> |