bdc76f
commit 1a7df49c92f62e14d8727f083fd055eba7c91ad9
bdc76f
Author: Stefan Liebler <stli@linux.ibm.com>
bdc76f
Date:   Fri Mar 22 11:14:07 2019 +0100
bdc76f
bdc76f
    S390: Add new hwcap values for new cpu architecture arch13.
bdc76f
    
bdc76f
    The new hwcap values indicate support for:
bdc76f
    -"Vector-Enhancements Facility 2" (tag "vxe2", hwcap 2^15)
bdc76f
    -"Vector-Packed-Decimal-Enhancement Facility" (tag "vxp", hwcap 2^16)
bdc76f
    -"Enhanced-Sort Facility" (tag "sort", hwcap 2^17)
bdc76f
    -"Deflate-Conversion Facility" (tag "dflt", hwcap 2^18)
bdc76f
    
bdc76f
    The vxe2 hwcap is also marked as important hwcap.
bdc76f
    
bdc76f
    ChangeLog:
bdc76f
    
bdc76f
            * sysdeps/s390/dl-procinfo.c (_dl_s390_cap_flags):
bdc76f
            Add vxe2, vxp, dflt, sort flags.
bdc76f
            * sysdeps/s390/dl-procinfo.h: Add HWCAP_S390_VXRS_EXT2,
bdc76f
            HWCAP_S390_VXRS_PDE, HWCAP_S390_SORT, HWCAP_S390_DFLT
bdc76f
            capabilities.
bdc76f
            (HWCAP_IMPORTANT): Add HWCAP_S390_VXRS_EXT2.
bdc76f
            * sysdeps/unix/sysv/linux/s390/bits/hwcap.h
bdc76f
            (HWCAP_S390_VXRS_EXT2, HWCAP_S390_VXRS_PDE, HWCAP_S390_SORT,
bdc76f
            HWCAP_S390_DFLT): Define.
bdc76f
bdc76f
diff --git a/sysdeps/s390/dl-procinfo.c b/sysdeps/s390/dl-procinfo.c
bdc76f
index 86c964caff6a1bc4..6ea220a171d8fab7 100644
bdc76f
--- a/sysdeps/s390/dl-procinfo.c
bdc76f
+++ b/sysdeps/s390/dl-procinfo.c
bdc76f
@@ -46,12 +46,12 @@
bdc76f
 #if !defined PROCINFO_DECL && defined SHARED
bdc76f
   ._dl_s390_cap_flags
bdc76f
 #else
bdc76f
-PROCINFO_CLASS const char _dl_s390_cap_flags[15][9]
bdc76f
+PROCINFO_CLASS const char _dl_s390_cap_flags[19][9]
bdc76f
 #endif
bdc76f
 #ifndef PROCINFO_DECL
bdc76f
 = {
bdc76f
      "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp", "edat", "etf3eh",
bdc76f
-     "highgprs", "te", "vx", "vxd", "vxe", "gs"
bdc76f
+     "highgprs", "te", "vx", "vxd", "vxe", "gs", "vxe2", "vxp", "sort", "dflt"
bdc76f
   }
bdc76f
 #endif
bdc76f
 #if !defined SHARED || defined PROCINFO_DECL
bdc76f
diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h
bdc76f
index f71d64c3ab24e715..d03c69fffdbd06de 100644
bdc76f
--- a/sysdeps/s390/dl-procinfo.h
bdc76f
+++ b/sysdeps/s390/dl-procinfo.h
bdc76f
@@ -21,7 +21,7 @@
bdc76f
 #define _DL_PROCINFO_H	1
bdc76f
 #include <ldsodefs.h>
bdc76f
 
bdc76f
-#define _DL_HWCAP_COUNT 15
bdc76f
+#define _DL_HWCAP_COUNT 19
bdc76f
 
bdc76f
 #define _DL_PLATFORMS_COUNT	9
bdc76f
 
bdc76f
@@ -54,11 +54,16 @@ enum
bdc76f
   HWCAP_S390_VXD = 1 << 12,
bdc76f
   HWCAP_S390_VXE = 1 << 13,
bdc76f
   HWCAP_S390_GS = 1 << 14,
bdc76f
+  HWCAP_S390_VXRS_EXT2 = 1 << 15,
bdc76f
+  HWCAP_S390_VXRS_PDE = 1 << 16,
bdc76f
+  HWCAP_S390_SORT = 1 << 17,
bdc76f
+  HWCAP_S390_DFLT = 1 << 18,
bdc76f
 };
bdc76f
 
bdc76f
 #define HWCAP_IMPORTANT (HWCAP_S390_ZARCH | HWCAP_S390_LDISP \
bdc76f
 			 | HWCAP_S390_EIMM | HWCAP_S390_DFP  \
bdc76f
-			 | HWCAP_S390_VX | HWCAP_S390_VXE)
bdc76f
+			 | HWCAP_S390_VX | HWCAP_S390_VXE    \
bdc76f
+			 | HWCAP_S390_VXRS_EXT2)
bdc76f
 
bdc76f
 /* We cannot provide a general printing function.  */
bdc76f
 #define _dl_procinfo(type, word) -1
bdc76f
diff --git a/sysdeps/unix/sysv/linux/s390/bits/hwcap.h b/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
bdc76f
index 2564712399948375..6b9b59522e3d3bec 100644
bdc76f
--- a/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
bdc76f
+++ b/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
bdc76f
@@ -39,3 +39,7 @@
bdc76f
 #define HWCAP_S390_VXD          4096
bdc76f
 #define HWCAP_S390_VXE          8192
bdc76f
 #define HWCAP_S390_GS           16384
bdc76f
+#define HWCAP_S390_VXRS_EXT2    32768
bdc76f
+#define HWCAP_S390_VXRS_PDE     65536
bdc76f
+#define HWCAP_S390_SORT         131072
bdc76f
+#define HWCAP_S390_DFLT         262144