Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/arch/arm/include Pull up revision 1.2 (requested by...



details:   https://anonhg.NetBSD.org/src/rev/a99323574529
branches:  netbsd-1-6
changeset: 529384:a99323574529
user:      he <he%NetBSD.org@localhost>
date:      Mon Nov 18 01:03:30 2002 +0000

description:
Pull up revision 1.2 (requested by thorpej in ticket #667):
  Byte-swapping optimizations, enabled if compiling with GCC:
   o Byte-swap 16-bit and 32-bit constants at compile-time
   o Inline 16-bit and 32-bit variable byte-swaps

diffstat:

 sys/arch/arm/include/bswap.h |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 8b5dde305fb2 -r a99323574529 sys/arch/arm/include/bswap.h
--- a/sys/arch/arm/include/bswap.h      Mon Nov 18 00:54:40 2002 +0000
+++ b/sys/arch/arm/include/bswap.h      Mon Nov 18 01:03:30 2002 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: bswap.h,v 1.1 2001/01/10 19:02:05 bjh21 Exp $      */
+/*      $NetBSD: bswap.h,v 1.1.20.1 2002/11/18 01:03:30 he Exp $      */
 
 #ifndef _MACHINE_BSWAP_H_
 #define        _MACHINE_BSWAP_H_
@@ -6,4 +6,12 @@
 #define __BSWAP_RENAME
 #include <sys/bswap.h>
 
+#ifdef __GNUC__
+
+#include <arm/byte_swap.h>
+#define        bswap16(x)      __byte_swap_word(x)
+#define        bswap32(x)      __byte_swap_long(x)
+
+#endif /* __GNUC__ */
+
 #endif /* !_MACHINE_BSWAP_H_ */



Home | Main Index | Thread Index | Old Index