aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-08-08 04:51:57 +0000
committerUlrich Drepper <drepper@redhat.com>2008-08-08 04:51:57 +0000
commit1642331d3066e43daea5a33a6c12db6edf0e34f7 (patch)
treed57029038bd8f32d03e31e84f7c77d6566b8a5bb /sysdeps/powerpc
parent48b9466105cf4bf7012b90356ae097573a23fc5c (diff)
downloadglibc-1642331d3066e43daea5a33a6c12db6edf0e34f7.tar
glibc-1642331d3066e43daea5a33a6c12db6edf0e34f7.tar.gz
glibc-1642331d3066e43daea5a33a6c12db6edf0e34f7.tar.bz2
glibc-1642331d3066e43daea5a33a6c12db6edf0e34f7.zip
[BZ #6817]
2008-08-01 Steven Munroe <sjmunroe@us.ibm.com> Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> [BZ #6817] * sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Added the members 'vsx' and 'arch_2_06'. (_dl_powerpc_platforms): Add the member 'power7'. * sysdeps/powerpc/dl-procinfo.h: Modify _DL_HWCAP_FIRST to reflect the changes required by VSX and ISA 2.06. Modify _DL_PLATFORMS_COUNT to reflect the addition of 'power7'. Defined PPC_PLATFORM_POWER7. (_dl_string_platform): Add support for POWER7. * sysdeps/powerpc/sysdep.h: Define bit masks for VSX capability and ISA 2.06.
Diffstat (limited to 'sysdeps/powerpc')
-rw-r--r--sysdeps/powerpc/dl-procinfo.c10
-rw-r--r--sysdeps/powerpc/dl-procinfo.h10
-rw-r--r--sysdeps/powerpc/sysdep.h2
3 files changed, 15 insertions, 7 deletions
diff --git a/sysdeps/powerpc/dl-procinfo.c b/sysdeps/powerpc/dl-procinfo.c
index a732e94fa8..1c74c2a905 100644
--- a/sysdeps/powerpc/dl-procinfo.c
+++ b/sysdeps/powerpc/dl-procinfo.c
@@ -46,11 +46,12 @@
#if !defined PROCINFO_DECL && defined SHARED
._dl_powerpc_cap_flags
#else
-PROCINFO_CLASS const char _dl_powerpc_cap_flags[23][10]
+PROCINFO_CLASS const char _dl_powerpc_cap_flags[25][10]
#endif
#ifndef PROCINFO_DECL
= {
- "power6x", "dfp", "pa6t",
+ "vsx",
+ "arch_2_06", "power6x", "dfp", "pa6t",
"arch_2_05", "ic_snoop", "smt", "booke",
"cellbe", "power5+", "power5", "power4",
"notb", "efpdouble", "efpsingle", "spe",
@@ -67,7 +68,7 @@ PROCINFO_CLASS const char _dl_powerpc_cap_flags[23][10]
#if !defined PROCINFO_DECL && defined SHARED
._dl_powerpc_platforms
#else
-PROCINFO_CLASS const char _dl_powerpc_platforms[7][12]
+PROCINFO_CLASS const char _dl_powerpc_platforms[8][12]
#endif
#ifndef PROCINFO_DECL
= {
@@ -77,7 +78,8 @@ PROCINFO_CLASS const char _dl_powerpc_platforms[7][12]
[PPC_PLATFORM_POWER5_PLUS] = "power5+",
[PPC_PLATFORM_POWER6] = "power6",
[PPC_PLATFORM_CELL_BE] = "ppc-cell-be",
- [PPC_PLATFORM_POWER6X] = "power6x"
+ [PPC_PLATFORM_POWER6X] = "power6x",
+ [PPC_PLATFORM_POWER7] = "power7"
}
#endif
#if !defined SHARED || defined PROCINFO_DECL
diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h
index 0bf935385a..254195a94c 100644
--- a/sysdeps/powerpc/dl-procinfo.h
+++ b/sysdeps/powerpc/dl-procinfo.h
@@ -23,15 +23,15 @@
#include <ldsodefs.h>
#include <sysdep.h> /* This defines the PPC_FEATURE_* macros. */
-/* There are 20 bits used, but they are bits 12..31. */
-#define _DL_HWCAP_FIRST 9
+/* There are 25 bits used, but they are bits 7..31. */
+#define _DL_HWCAP_FIRST 7
#define _DL_HWCAP_COUNT 32
/* These bits influence library search. */
#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \
+ PPC_FEATURE_HAS_DFP)
-#define _DL_PLATFORMS_COUNT 7
+#define _DL_PLATFORMS_COUNT 8
#define _DL_FIRST_PLATFORM 32
/* Mask to filter out platforms. */
@@ -46,6 +46,7 @@
#define PPC_PLATFORM_POWER6 4
#define PPC_PLATFORM_CELL_BE 5
#define PPC_PLATFORM_POWER6X 6
+#define PPC_PLATFORM_POWER7 7
static inline const char *
__attribute__ ((unused))
@@ -103,6 +104,9 @@ _dl_string_platform (const char *str)
++str;
}
break;
+ case '7':
+ ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER7;
+ break;
default:
return -1;
}
diff --git a/sysdeps/powerpc/sysdep.h b/sysdeps/powerpc/sysdep.h
index 2ae52b78c0..43edeb71eb 100644
--- a/sysdeps/powerpc/sysdep.h
+++ b/sysdeps/powerpc/sysdep.h
@@ -44,6 +44,8 @@
#define PPC_FEATURE_PA6T 0x00000800 /* PA Semi 6T Core */
#define PPC_FEATURE_HAS_DFP 0x00000400 /* Decimal FP Unit */
#define PPC_FEATURE_POWER6_EXT 0x00000200 /* P6 + mffgpr/mftgpr */
+#define PPC_FEATURE_HAS_VSX 0x00000100 /* P7 Vector Extension. */
+#define PPC_FEATURE_ARCH_2_06 0x00000080 /* ISA 2.06 */
#define PPC_FEATURE_970 (PPC_FEATURE_POWER4 + PPC_FEATURE_HAS_ALTIVEC)
#ifdef __ASSEMBLER__