File ppc-power10-support.patch of Package glibc.34926
Index: glibc-2.22/sysdeps/powerpc/bits/hwcap.h
===================================================================
--- glibc-2.22.orig/sysdeps/powerpc/bits/hwcap.h
+++ glibc-2.22/sysdeps/powerpc/bits/hwcap.h
@@ -69,3 +69,5 @@
#define PPC_FEATURE2_ARCH_3_00 0x00800000 /* ISA 3.0 */
#define PPC_FEATURE2_HAS_IEEE128 0x00400000 /* VSX IEEE Binary Float
128-bit */
+#define PPC_FEATURE2_ARCH_3_1 0x00040000 /* ISA 3.1. */
+#define PPC_FEATURE2_MMA 0x00020000 /* Matrix-Multiply Assist. */
Index: glibc-2.22/sysdeps/powerpc/dl-procinfo.c
===================================================================
--- glibc-2.22.orig/sysdeps/powerpc/dl-procinfo.c
+++ glibc-2.22/sysdeps/powerpc/dl-procinfo.c
@@ -60,7 +60,7 @@ PROCINFO_CLASS const char _dl_powerpc_ca
"", "", "", "",
"", "", "", "",
"", "", "", "",
- "", "", "", "",
+ "", "mma", "arch_3_1", "",
"", "", "ieee128", "arch_3_00",
"htm-nosc", "vcrypto", "tar", "isel",
"ebb", "dscr", "htm", "arch_2_07",
Index: glibc-2.22/sysdeps/powerpc/dl-procinfo.h
===================================================================
--- glibc-2.22.orig/sysdeps/powerpc/dl-procinfo.h
+++ glibc-2.22/sysdeps/powerpc/dl-procinfo.h
@@ -40,7 +40,7 @@
#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \
+ PPC_FEATURE_HAS_DFP)
-#define _DL_PLATFORMS_COUNT 15
+#define _DL_PLATFORMS_COUNT 16
#define _DL_FIRST_PLATFORM 32
/* Mask to filter out platforms. */
@@ -63,6 +63,7 @@
#define PPC_PLATFORM_PPC476 12
#define PPC_PLATFORM_POWER8 13
#define PPC_PLATFORM_POWER9 14
+#define PPC_PLATFORM_POWER10 15
static inline const char *
__attribute__ ((unused))
@@ -101,6 +102,15 @@ _dl_string_platform (const char *str)
str += 5;
switch (*str)
{
+ case '1':
+ if (str[1] == '0')
+ {
+ ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER10;
+ str++;
+ }
+ else
+ return -1;
+ break;
case '4':
ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER4;
break;