patch-2.4.25 linux-2.4.25/include/asm-alpha/elf.h

Next file: linux-2.4.25/include/asm-alpha/system.h
Previous file: linux-2.4.25/include/acpi/platform/aclinux.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.24/include/asm-alpha/elf.h linux-2.4.25/include/asm-alpha/elf.h
@@ -66,27 +66,19 @@
    instruction set this CPU supports.  This is trivial on Alpha, 
    but not so on other machines. */
 
-#define ELF_HWCAP							\
-({									\
-	/* Sadly, most folks don't yet have assemblers that know about	\
-	   amask.  This is "amask v0, v0" */				\
-	register long _v0 __asm("$0") = -1;				\
-	__asm(".long 0x47e00c20" : "=r"(_v0) : "0"(_v0));		\
-	~_v0;								\
-})
+#define ELF_HWCAP  (~amask(-1))
 
 /* This yields a string that ld.so will use to load implementation
    specific libraries for optimization.  This is more specific in
-   intent than poking at uname or /proc/cpuinfo.  
-
-   This might do with checking bwx simultaneously...  */
+   intent than poking at uname or /proc/cpuinfo.  */
 
 #define ELF_PLATFORM				\
 ({						\
-	/* Or "implver v0" ... */		\
-	register long _v0 __asm("$0");		\
-	__asm(".long 0x47e03d80" : "=r"(_v0));	\
-	_v0 == 0 ? "ev4" : "ev5";		\
+	enum implver_enum i_ = implver();	\
+	( i_ == IMPLVER_EV4 ? "ev4"		\
+	: i_ == IMPLVER_EV5			\
+	  ? (amask(AMASK_BWX) ? "ev5" : "ev56")	\
+	: amask (AMASK_CIX) ? "ev6" : "ev67");	\
 })
 
 #ifdef __KERNEL__

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)