patch-1.3.51 linux/include/asm-i386/byteorder.h
Next file: linux/include/asm-i386/smp.h
Previous file: linux/fs/proc/array.c
Back to the patch index
Back to the overall index
-  Lines: 16
 -  Date:
Tue Dec 26 06:44:35 1995
 -  Orig file: 
v1.3.50/linux/include/asm-i386/byteorder.h
 -  Orig date: 
Fri Oct  6 14:35:16 1995
 
diff -u --recursive --new-file v1.3.50/linux/include/asm-i386/byteorder.h linux/include/asm-i386/byteorder.h
@@ -27,11 +27,15 @@
 extern __inline__ unsigned long int
 __ntohl(unsigned long int x)
 {
+#if defined(CONFIG_M486) && defined(__KERNEL__)
+	__asm__("bswap %0" : "=r" (x) : "0" (x));
+#else
 	__asm__("xchgb %b0,%h0\n\t"	/* swap lower bytes	*/
 		"rorl $16,%0\n\t"	/* swap words		*/
 		"xchgb %b0,%h0"		/* swap higher bytes	*/
 		:"=q" (x)
 		: "0" (x));
+#endif	
 	return x;
 }
 
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