patch-1.3.22 linux/include/asm-alpha/bitops.h

Next file: linux/include/asm-alpha/hwrpb.h
Previous file: linux/include/asm-alpha/apecs.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.21/linux/include/asm-alpha/bitops.h linux/include/asm-alpha/bitops.h
@@ -20,18 +20,18 @@
 
 	__asm__ __volatile__(
 		"\n1:\t"
-		"ldq_l %0,%1\n\t"
+		"ldl_l %0,%1\n\t"
 		"and %0,%3,%2\n\t"
 		"bne %2,2f\n\t"
 		"xor %0,%3,%0\n\t"
-		"stq_c %0,%1\n\t"
+		"stl_c %0,%1\n\t"
 		"beq %0,1b\n"
 		"2:"
 		:"=&r" (temp),
-		 "=m" (((unsigned long *) addr)[nr >> 6]),
+		 "=m" (((int *) addr)[nr >> 5]),
 		 "=&r" (oldbit)
-		:"r" (1UL << (nr & 63)),
-		 "m" (((unsigned long *) addr)[nr >> 6]));
+		:"r" (1UL << (nr & 31)),
+		 "m" (((int *) addr)[nr >> 5]));
 	return oldbit != 0;
 }
 
@@ -42,18 +42,18 @@
 
 	__asm__ __volatile__(
 		"\n1:\t"
-		"ldq_l %0,%1\n\t"
+		"ldl_l %0,%1\n\t"
 		"and %0,%3,%2\n\t"
 		"beq %2,2f\n\t"
 		"xor %0,%3,%0\n\t"
-		"stq_c %0,%1\n\t"
+		"stl_c %0,%1\n\t"
 		"beq %0,1b\n"
 		"2:"
 		:"=&r" (temp),
-		 "=m" (((unsigned long *) addr)[nr >> 6]),
+		 "=m" (((int *) addr)[nr >> 5]),
 		 "=&r" (oldbit)
-		:"r" (1UL << (nr & 63)),
-		 "m" (((unsigned long *) addr)[nr >> 6]));
+		:"r" (1UL << (nr & 31)),
+		 "m" (((int *) addr)[nr >> 5]));
 	return oldbit != 0;
 }
 
@@ -64,22 +64,22 @@
 
 	__asm__ __volatile__(
 		"\n1:\t"
-		"ldq_l %0,%1\n\t"
+		"ldl_l %0,%1\n\t"
 		"and %0,%3,%2\n\t"
 		"xor %0,%3,%0\n\t"
-		"stq_c %0,%1\n\t"
+		"stl_c %0,%1\n\t"
 		"beq %0,1b\n"
 		:"=&r" (temp),
-		 "=m" (((unsigned long *) addr)[nr >> 6]),
+		 "=m" (((int *) addr)[nr >> 5]),
 		 "=&r" (oldbit)
-		:"r" (1UL << (nr & 63)),
-		 "m" (((unsigned long *) addr)[nr >> 6]));
+		:"r" (1UL << (nr & 31)),
+		 "m" (((int *) addr)[nr >> 5]));
 	return oldbit != 0;
 }
 
 extern __inline__ unsigned long test_bit(int nr, void * addr)
 {
-	return 1UL & (((unsigned long *) addr)[nr >> 6] >> (nr & 63));
+	return 1UL & (((int *) addr)[nr >> 5] >> (nr & 31));
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this