patch-2.4.0-test8 linux/include/asm-alpha/bitops.h

Next file: linux/include/asm-alpha/core_irongate.h
Previous file: linux/fs/vfat/namei.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test7/linux/include/asm-alpha/bitops.h linux/include/asm-alpha/bitops.h
@@ -175,13 +175,10 @@
 
 extern inline unsigned long ffz(unsigned long word)
 {
-#if 0 && defined(__alpha_cix__)
-	/* Swine architects -- a year after they publish v3 of the
-	   handbook, in the 21264 data sheet they quietly change CIX
-	   to FIX and remove the spiffy counting instructions.  */
+#if defined(__alpha_cix__) && defined(__alpha_fix__)
 	/* Whee.  EV6 can calculate it directly.  */
 	unsigned long result;
-	__asm__("ctlz %1,%0" : "=r"(result) : "r"(~word));
+	__asm__("cttz %1,%0" : "=r"(result) : "r"(~word));
 	return result;
 #else
 	unsigned long bits, qofs, bofs;
@@ -214,10 +211,7 @@
  * of bits set) of a N-bit word
  */
 
-#if 0 && defined(__alpha_cix__)
-/* Swine architects -- a year after they publish v3 of the handbook, in
-   the 21264 data sheet they quietly change CIX to FIX and remove the
-   spiffy counting instructions.  */
+#if defined(__alpha_cix__) && defined(__alpha_fix__)
 /* Whee.  EV6 can calculate it directly.  */
 extern __inline__ unsigned long hweight64(unsigned long w)
 {

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