about summary refs log tree commit diff
path: root/sysdeps/s390/multiarch/utf16-utf32-z9.c
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.vnet.ibm.com>2017-06-27 17:09:43 +0200
committerStefan Liebler <stli@linux.vnet.ibm.com>2017-06-27 17:09:43 +0200
commitf0137ff31da85bc7d9bd4e621af958d8b7249475 (patch)
tree1d2cd5fd8abe3cdd44b074c2e5c7485d227b10cd /sysdeps/s390/multiarch/utf16-utf32-z9.c
parent593e4da186906525e2a0bdc4d87601bd0c2625eb (diff)
downloadglibc-f0137ff31da85bc7d9bd4e621af958d8b7249475.tar.gz
glibc-f0137ff31da85bc7d9bd4e621af958d8b7249475.tar.xz
glibc-f0137ff31da85bc7d9bd4e621af958d8b7249475.zip
S390: Use cu24 instruction for converting from utf16 to utf32.
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
cu24 instruction.

ChangeLog:

	* sysdeps/s390/utf16-utf32-z9.c (__from_utf16_loop_vx_cu):
	Use vector and cu24 instruction.
    	* sysdeps/s390/multiarch/utf16-utf32-z9.c:
    	Add __from_utf16_loop_vx_cu in ifunc resolver.
Diffstat (limited to 'sysdeps/s390/multiarch/utf16-utf32-z9.c')
-rw-r--r--sysdeps/s390/multiarch/utf16-utf32-z9.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/s390/multiarch/utf16-utf32-z9.c b/sysdeps/s390/multiarch/utf16-utf32-z9.c
index ded3cc2ad9..917de5f5cc 100644
--- a/sysdeps/s390/multiarch/utf16-utf32-z9.c
+++ b/sysdeps/s390/multiarch/utf16-utf32-z9.c
@@ -32,9 +32,11 @@ strong_alias (SINGLE_NAME (TO_LOOP_DEFAULT), SINGLE_NAME (TO_LOOP))
 
 /* Generate ifunc'ed loop functions for FROM/TO_LOOP.  */
 s390_libc_ifunc_expr (FROM_LOOP_DEFAULT, FROM_LOOP,
-		      (HAVE_FROM_VX && (hwcap & HWCAP_S390_VX))
-		      ? FROM_LOOP_VX
-		      : FROM_LOOP_DEFAULT);
+		      (HAVE_FROM_VX_CU && (hwcap & HWCAP_S390_VXE))
+		      ? FROM_LOOP_VX_CU
+		      : (HAVE_FROM_VX && (hwcap & HWCAP_S390_VX))
+			? FROM_LOOP_VX
+			: FROM_LOOP_DEFAULT);
 
 s390_libc_ifunc_expr (TO_LOOP_DEFAULT, TO_LOOP,
 		      (HAVE_TO_VX_CU && (hwcap & HWCAP_S390_VXE))