patch-2.4.19 linux-2.4.19/include/asm-mips/string.h

Next file: linux-2.4.19/include/asm-mips/system.h
Previous file: linux-2.4.19/include/asm-mips/stackframe.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/include/asm-mips/string.h linux-2.4.19/include/asm-mips/string.h
@@ -28,7 +28,7 @@
 	".set\treorder"
 	: "=r" (__dest), "=r" (__src)
         : "0" (__dest), "1" (__src)
-	: "$1","memory");
+	: "memory");
 
   return __xdest;
 }
@@ -56,7 +56,7 @@
 	".set\treorder"
         : "=r" (__dest), "=r" (__src), "=r" (__n)
         : "0" (__dest), "1" (__src), "2" (__n)
-        : "$1","memory");
+        : "memory");
 
   return __dest;
 }
@@ -84,8 +84,7 @@
 	"3:\t.set\tat\n\t"
 	".set\treorder"
 	: "=r" (__cs), "=r" (__ct), "=r" (__res)
-	: "0" (__cs), "1" (__ct)
-	: "$1");
+	: "0" (__cs), "1" (__ct));
 
   return __res;
 }
@@ -116,8 +115,7 @@
 	".set\tat\n\t"
 	".set\treorder"
 	: "=r" (__cs), "=r" (__ct), "=r" (__count), "=r" (__res)
-	: "0" (__cs), "1" (__ct), "2" (__count)
-	: "$1");
+	: "0" (__cs), "1" (__ct), "2" (__count));
 
 	return __res;
 }
@@ -138,18 +136,18 @@
 extern __inline__ void *memscan(void *__addr, int __c, size_t __size)
 {
 	char *__end = (char *)__addr + __size;
+	unsigned char __uc = (unsigned char) __c;
 
 	__asm__(".set\tpush\n\t"
 		".set\tnoat\n\t"
 		".set\treorder\n\t"
 		"1:\tbeq\t%0,%1,2f\n\t"
 		"addiu\t%0,1\n\t"
-		"lb\t$1,-1(%0)\n\t"
+		"lbu\t$1,-1(%0)\n\t"
 		"bne\t$1,%z4,1b\n"
 		"2:\t.set\tpop"
 		: "=r" (__addr), "=r" (__end)
-		: "0" (__addr), "1" (__end), "Jr" (__c)
-		: "$1");
+		: "0" (__addr), "1" (__end), "Jr" (__uc));
 
 	return __addr;
 }

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