about summary refs log tree commit diff
path: root/sysdeps/s390/s390-64/tst-glibc-hwcaps.c
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.ibm.com>2022-04-13 14:36:09 +0200
committerStefan Liebler <stli@linux.ibm.com>2022-04-14 10:37:45 +0200
commit2376944b9e5c0364b9fb473e4d8dabca31b57167 (patch)
tree667c9804b85bc97b8c465f433d965b479d1e8e81 /sysdeps/s390/s390-64/tst-glibc-hwcaps.c
parent535e935a284b2ec96659d1ac40eebf61321f2362 (diff)
downloadglibc-2376944b9e5c0364b9fb473e4d8dabca31b57167.tar.gz
glibc-2376944b9e5c0364b9fb473e4d8dabca31b57167.tar.xz
glibc-2376944b9e5c0364b9fb473e4d8dabca31b57167.zip
S390: Add new s390 platform z16.
The new IBM z16 is added to platform string array.
The macro _DL_PLATFORMS_COUNT is incremented.

_dl_hwcaps_subdir is extended by "z16" if HWCAP_S390_VXRS_PDE2
is set. HWCAP_S390_NNPA is not tested in _dl_hwcaps_subdirs_active
as those instructions may be replaced or removed in future.

tst-glibc-hwcaps.c is extended in order to test z16 via new marker5.

A fatal glibc error is dumped if glibc was build with architecture
level set for z16, but run on an older machine. (See dl-hwcap-check.h)
Diffstat (limited to 'sysdeps/s390/s390-64/tst-glibc-hwcaps.c')
-rw-r--r--sysdeps/s390/s390-64/tst-glibc-hwcaps.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/s390/s390-64/tst-glibc-hwcaps.c b/sysdeps/s390/s390-64/tst-glibc-hwcaps.c
index cf3b765b5d..a29891bdc1 100644
--- a/sysdeps/s390/s390-64/tst-glibc-hwcaps.c
+++ b/sysdeps/s390/s390-64/tst-glibc-hwcaps.c
@@ -25,6 +25,7 @@
 extern int marker2 (void);
 extern int marker3 (void);
 extern int marker4 (void);
+extern int marker5 (void);
 
 /* Return the arch level, 10 for the baseline libmarkermod*.so's.  */
 static int
@@ -63,9 +64,11 @@ compute_level (void)
     return 12;
   if (strcmp (platform, "z15") == 0)
     return 13;
+  if (strcmp (platform, "z16") == 0)
+    return 14;
   printf ("warning: unrecognized AT_PLATFORM value: %s\n", platform);
-  /* Assume that the new platform supports z15.  */
-  return 13;
+  /* Assume that the new platform supports z16.  */
+  return 14;
 }
 
 static int
@@ -76,6 +79,7 @@ do_test (void)
   TEST_COMPARE (marker2 (), MIN (level - 9, 2));
   TEST_COMPARE (marker3 (), MIN (level - 9, 3));
   TEST_COMPARE (marker4 (), MIN (level - 9, 4));
+  TEST_COMPARE (marker5 (), MIN (level - 9, 5));
   return 0;
 }