From 23ea69a9d6e9ab28c66a232b767a800b04eaa938 Mon Sep 17 00:00:00 2001 From: Stefan Liebler Date: Tue, 27 Jun 2017 17:09:42 +0200 Subject: S390: Use cu41 instruction for converting from utf32 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 cu41 instruction. ChangeLog: * sysdeps/s390/utf8-utf32-z9.c (__to_utf8_loop_vx_cu): Use vector and cu41 instruction. * sysdeps/s390/multiarch/utf8-utf32-z9.c: Add __to_utf8_loop_vx_cu in ifunc resolver. --- sysdeps/s390/multiarch/utf8-utf32-z9.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sysdeps/s390/multiarch/utf8-utf32-z9.c') diff --git a/sysdeps/s390/multiarch/utf8-utf32-z9.c b/sysdeps/s390/multiarch/utf8-utf32-z9.c index faf1f46aa9..0c6d9e97d8 100644 --- a/sysdeps/s390/multiarch/utf8-utf32-z9.c +++ b/sysdeps/s390/multiarch/utf8-utf32-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 -- cgit 1.4.1