about summary refs log tree commit diff
path: root/sysdeps/s390/configure
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.ibm.com>2021-03-23 17:29:26 +0100
committerStefan Liebler <stli@linux.ibm.com>2021-03-26 10:51:31 +0100
commit7759be2593b689cb1eafc0f52ee7f59c639e5d2f (patch)
tree9fe921acd60d3020da8dc14c6ed335ef6e92ae3d /sysdeps/s390/configure
parent1966f47a1e54f962a355a5f6a6b730c9848ab956 (diff)
downloadglibc-7759be2593b689cb1eafc0f52ee7f59c639e5d2f.tar.gz
glibc-7759be2593b689cb1eafc0f52ee7f59c639e5d2f.tar.xz
glibc-7759be2593b689cb1eafc0f52ee7f59c639e5d2f.zip
S390: Also check vector support in memmove ifunc-selector [BZ #27511]
The arch13 memmove variant is currently selected by the ifunc selector
if the Miscellaneous-Instruction-Extensions Facility 3 facility bit
is present, but the function is also using vector instructions.
If the vector support is not present, one is receiving an operation
exception.

Therefore this patch also checks for vector support in the ifunc
selector and in ifunc-impl-list.c.

Just to be sure, the configure check is now also testing an arch13
vector instruction and an arch13 Miscellaneous-Instruction-Extensions
Facility 3 instruction.
Diffstat (limited to 'sysdeps/s390/configure')
-rw-r--r--sysdeps/s390/configure8
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/s390/configure b/sysdeps/s390/configure
index 5f98640d0f..7eaefbabcf 100644
--- a/sysdeps/s390/configure
+++ b/sysdeps/s390/configure
@@ -123,7 +123,9 @@ void testinsn (char *buf)
     __asm__ (".machine \"arch13\" \n\t"
 	     ".machinemode \"zarch_nohighgprs\" \n\t"
 	     "lghi %%r0,16 \n\t"
-	     "mvcrl 0(%0),32(%0)" : : "a" (buf) : "memory", "r0");
+	     "mvcrl 0(%0),32(%0) \n\t"
+	     "vstrs %%v20,%%v20,%%v20,%%v20,0,2"
+	     : : "a" (buf) : "memory", "r0");
 }
 EOF
 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS --shared conftest.c
@@ -271,7 +273,9 @@ else
 void testinsn (char *buf)
 {
     __asm__ ("lghi %%r0,16 \n\t"
-	     "mvcrl 0(%0),32(%0)" : : "a" (buf) : "memory", "r0");
+	     "mvcrl 0(%0),32(%0) \n\t"
+	     "vstrs %%v20,%%v20,%%v20,%%v20,0,2"
+	     : : "a" (buf) : "memory", "r0");
 }
 EOF
 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS --shared conftest.c