patch-2.2.0-pre6 linux/include/asm-arm/byteorder.h
Next file: linux/include/asm-arm/dec21285.h
Previous file: linux/include/asm-arm/atomic.h
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Thu Jan 7 15:51:33 1999
- Orig file:
v2.2.0-pre5/linux/include/asm-arm/byteorder.h
- Orig date:
Tue Dec 22 14:16:58 1998
diff -u --recursive --new-file v2.2.0-pre5/linux/include/asm-arm/byteorder.h linux/include/asm-arm/byteorder.h
@@ -3,10 +3,14 @@
#include <asm/types.h>
-#if defined(__GNUC__) && __GNUC__ == 2 && __GNUC_MINOR__ < 80
+#if defined(__GNUC__) && __GNUC__ == 2 && __GNUC_MINOR__ < 8
-/* Recent versions of GCC can do as well or better than this
- on their own - we shouldn't interfere. */
+/* Recent versions of GCC can open code the swaps at least as well
+ as we can write them by hand, so the "optimisations" here only
+ make sense for older compilers. Worse, some versions of GCC
+ actually go wrong in the presence of the assembler versions.
+ We play it safe and only turn them on for compilers older than
+ GCC 2.8.0. */
static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
{
@@ -35,6 +39,11 @@
#define __arch__swab16(x) ___arch__swab16(x)
#endif /* __GNUC__ */
+
+#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
+# define __BYTEORDER_HAS_U64__
+# define __SWAB_64_THRU_32__
+#endif
#include <linux/byteorder/little_endian.h>
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov