No subject


Sat Oct 6 20:13:59 UTC 2007


__bswap_16 could not assume that it's zero extended when an unsigned short int is loaded into the data register.


Modified:
   trunk/uClibc/libc/sysdeps/linux/bfin/bits/byteswap.h


Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/bfin/bits/byteswap.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/bfin/bits/byteswap.h	2007-11-23 17:09:54 UTC (rev 20505)
+++ trunk/uClibc/libc/sysdeps/linux/bfin/bits/byteswap.h	2007-11-23 17:14:20 UTC (rev 20506)
@@ -25,9 +25,10 @@
 	 if (__builtin_constant_p (__x))				      \
 	   __v = __bswap_constant_16 (__x);				      \
 	 else								      \
-	   __asm__ ("%0 <<= 8;"						      \
-		    "%1.L = %0.L + %0.H (NS);"				      \
-		    : "+d" (__x), "=d" (__v));				      \
+	   __asm__ ("%0 = PACK (%1.L, %1.L);"				      \
+		    "%0 >>= 8;"						      \
+		    : "=d" (__v)					      \
+		    : "d" (__x));					      \
 	 __v; }))
 #else
 static __inline unsigned short int



More information about the uClibc-cvs mailing list