This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Recognize new sparc hwcap bits.


This teaches glibc about the new hwcap feature bits that represent
facilities which show up starting with the SPARC-T4 cpu.

Committed to master.

	* sysdeps/sparc/bits/hwcap.h (HWCAP_SPARC_PAUSE,
	HWCAP_SPARC_CBCOND, HWCAP_SPARC_CRYPTO): Define.
	* sysdeps/sparc/dl-procinfo.h (_DL_HWCAP_COUNT): Increase to 27.
	* sysdeps/sparc/dl-procinfo.c (_dl_sparc_cap_flags): Add new
	entries.
---
 ChangeLog                   |    6 ++++++
 sysdeps/sparc/bits/hwcap.h  |    3 +++
 sysdeps/sparc/dl-procinfo.c |    4 ++--
 sysdeps/sparc/dl-procinfo.h |    2 +-
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3249500..c69a7c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,12 @@
 
 	* sysdeps/sparc/fpu/libm-test-ulps: Update.
 
+	* sysdeps/sparc/bits/hwcap.h (HWCAP_SPARC_PAUSE,
+	HWCAP_SPARC_CBCOND, HWCAP_SPARC_CRYPTO): Define.
+	* sysdeps/sparc/dl-procinfo.h (_DL_HWCAP_COUNT): Increase to 27.
+	* sysdeps/sparc/dl-procinfo.c (_dl_sparc_cap_flags): Add new
+	entries.
+
 2012-09-05  Alexandre Oliva  <aoliva@redhat.com>
 
 	* malloc/arena.c: Fold copyright years.
diff --git a/sysdeps/sparc/bits/hwcap.h b/sysdeps/sparc/bits/hwcap.h
index d922d7b..74ca130 100644
--- a/sysdeps/sparc/bits/hwcap.h
+++ b/sysdeps/sparc/bits/hwcap.h
@@ -45,3 +45,6 @@
 #define HWCAP_SPARC_IMA		0x00400000
 #define HWCAP_SPARC_ASI_CACHE_SPARING \
 				0x00800000
+#define HWCAP_SPARC_PAUSE	0x01000000
+#define HWCAP_SPARC_CBCOND	0x02000000
+#define HWCAP_SPARC_CRYPTO	0x04000000
diff --git a/sysdeps/sparc/dl-procinfo.c b/sysdeps/sparc/dl-procinfo.c
index 6e107dd..8280e01 100644
--- a/sysdeps/sparc/dl-procinfo.c
+++ b/sysdeps/sparc/dl-procinfo.c
@@ -46,13 +46,13 @@
 #if !defined PROCINFO_DECL && defined SHARED
   ._dl_sparc_cap_flags
 #else
-PROCINFO_CLASS const char _dl_sparc_cap_flags[24][11]
+PROCINFO_CLASS const char _dl_sparc_cap_flags[27][11]
 #endif
 #ifndef PROCINFO_DECL
   = { "flush", "stbar", "swap", "muldiv", "v9", "ultra3", "v9v", "v9v2",
       "mul32", "div32", "fsmuld", "v8plus", "popc", "vis", "vis2",
       "ASIBlkInit", "fmaf", "vis3", "hpc", "random", "trans", "fjfmau",
-      "ima", "cspare" }
+      "ima", "cspare", "pause", "cbcond", "crypto" }
 #endif
 #if !defined SHARED || defined PROCINFO_DECL
 ;
diff --git a/sysdeps/sparc/dl-procinfo.h b/sysdeps/sparc/dl-procinfo.h
index 8ceb830..6ae8768 100644
--- a/sysdeps/sparc/dl-procinfo.h
+++ b/sysdeps/sparc/dl-procinfo.h
@@ -24,7 +24,7 @@
 #include <ldsodefs.h>
 #include <sysdep.h>
 
-#define _DL_HWCAP_COUNT 24
+#define _DL_HWCAP_COUNT 27
 
 static inline int
 __attribute__ ((unused))
-- 
1.7.10.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]